Commit 0bfc934b authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] procfs build fix for older gcc

- declarations come first

- fix bizarre coding style.
parent 05ea2914
...@@ -1713,11 +1713,14 @@ static int proc_task_readdir(struct file * filp, void * dirent, filldir_t filldi ...@@ -1713,11 +1713,14 @@ static int proc_task_readdir(struct file * filp, void * dirent, filldir_t filldi
nr_tids = get_tid_list(pos, tid_array, inode); nr_tids = get_tid_list(pos, tid_array, inode);
for (i = 0; i < nr_tids; i++) { for (i = 0; i < nr_tids; i++) {
unsigned long j = PROC_NUMBUF;
int tid = tid_array[i]; int tid = tid_array[i];
ino = fake_ino(tid,PROC_TID_INO); ino = fake_ino(tid,PROC_TID_INO);
unsigned long j = PROC_NUMBUF;
do buf[--j] = '0' + (tid % 10); while (tid/=10); do
buf[--j] = '0' + (tid % 10);
while (tid /= 10);
if (filldir(dirent, buf+j, PROC_NUMBUF-j, pos, ino, DT_DIR) < 0) if (filldir(dirent, buf+j, PROC_NUMBUF-j, pos, ino, DT_DIR) < 0)
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment