aboutsummaryrefslogtreecommitdiff
path: root/procps/top.c
diff options
context:
space:
mode:
Diffstat (limited to 'procps/top.c')
-rw-r--r--procps/top.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/procps/top.c b/procps/top.c
index 5faeafb59..a2a44da7d 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) {