aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvodz <vodz@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-01-30 13:58:34 +0000
committervodz <vodz@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-01-30 13:58:34 +0000
commit8750da117840ab4ba590a3db0e45b71dc1c96f91 (patch)
treee93f5480e506ba9c9eda2b2c3b9b210c29398c54
parentac66c66ec40edff6b3f11e18a09c0f9c83db4936 (diff)
downloadbusybox-w32-8750da117840ab4ba590a3db0e45b71dc1c96f91.tar.gz
busybox-w32-8750da117840ab4ba590a3db0e45b71dc1c96f91.tar.bz2
busybox-w32-8750da117840ab4ba590a3db0e45b71dc1c96f91.zip
removed warning "comparison between signed and unsigned". Added ATTRIBUTE_UNUSED. My whitespace
git-svn-id: svn://busybox.net/trunk/busybox@13711 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--procps/top.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/procps/top.c b/procps/top.c
index a2a44da7d..fbe060dfe 100644
--- a/procps/top.c
+++ b/procps/top.c
@@ -133,20 +133,20 @@ static unsigned long Hertz;
133#define FILE_TO_BUF(filename, fd) do{ \ 133#define FILE_TO_BUF(filename, fd) do{ \
134 if (fd == -1 && (fd = open(filename, O_RDONLY)) == -1) { \ 134 if (fd == -1 && (fd = open(filename, O_RDONLY)) == -1) { \
135 bb_perror_msg_and_die("/proc not be mounted?"); \ 135 bb_perror_msg_and_die("/proc not be mounted?"); \
136 } \ 136 } \
137 lseek(fd, 0L, SEEK_SET); \ 137 lseek(fd, 0L, SEEK_SET); \
138 if ((local_n = read(fd, buf, sizeof buf - 1)) < 0) { \ 138 if ((local_n = read(fd, buf, sizeof buf - 1)) < 0) { \
139 bb_perror_msg_and_die("%s", filename); \ 139 bb_perror_msg_and_die("%s", filename); \
140 } \ 140 } \
141 buf[local_n] = '\0'; \ 141 buf[local_n] = '\0'; \
142}while(0) 142}while(0)
143 143
144#define FILE_TO_BUF2(filename, fd) do{ \ 144#define FILE_TO_BUF2(filename, fd) do{ \
145 lseek(fd, 0L, SEEK_SET); \ 145 lseek(fd, 0L, SEEK_SET); \
146 if ((local_n = read(fd, buf, sizeof buf - 1)) < 0) { \ 146 if ((local_n = read(fd, buf, sizeof buf - 1)) < 0) { \
147 bb_perror_msg_and_die("%s", filename); \ 147 bb_perror_msg_and_die("%s", filename); \
148 } \ 148 } \
149 buf[local_n] = '\0'; \ 149 buf[local_n] = '\0'; \
150}while(0) 150}while(0)
151 151
152static void init_Hertz_value(void) { 152static void init_Hertz_value(void) {
@@ -395,7 +395,7 @@ static void display_status(int count, int col)
395 s->pid, s->user, s->state, rss_str_buf, s->ppid, 395 s->pid, s->user, s->state, rss_str_buf, s->ppid,
396 pmem/10, pmem%10); 396 pmem/10, pmem%10);
397#endif 397#endif
398 if(strlen(namecmd) > col) 398 if((int)strlen(namecmd) > col)
399 namecmd[col] = 0; 399 namecmd[col] = 0;
400 printf("%s\n", namecmd); 400 printf("%s\n", namecmd);
401 s++; 401 s++;
@@ -428,7 +428,7 @@ static void reset_term(void)
428#endif /* CONFIG_FEATURE_CLEAN_UP */ 428#endif /* CONFIG_FEATURE_CLEAN_UP */
429} 429}
430 430
431static void sig_catcher (int sig) 431static void sig_catcher (int sig ATTRIBUTE_UNUSED)
432{ 432{
433 reset_term(); 433 reset_term();
434} 434}