diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/filelock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/filelock.c b/src/filelock.c index fc00647baba..c80f75ce924 100644 --- a/src/filelock.c +++ b/src/filelock.c | |||
| @@ -116,12 +116,12 @@ get_boot_time () | |||
| 116 | 116 | ||
| 117 | while ((fd = open ("/proc/uptime", O_RDONLY)) >= 0) | 117 | while ((fd = open ("/proc/uptime", O_RDONLY)) >= 0) |
| 118 | { | 118 | { |
| 119 | char buf[BUFSIZ]; | 119 | char buf[100]; |
| 120 | int res; | 120 | int res; |
| 121 | double upsecs; | 121 | double upsecs; |
| 122 | time_t uptime; | 122 | time_t uptime; |
| 123 | 123 | ||
| 124 | read (fd, buf, BUFSIZ); | 124 | read (fd, buf, sizeof buf); |
| 125 | close (fd); | 125 | close (fd); |
| 126 | 126 | ||
| 127 | res = sscanf (buf, "%lf", &upsecs); | 127 | res = sscanf (buf, "%lf", &upsecs); |