aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1999-02-23 22:09:47 +0000
committerKarl Heuer1999-02-23 22:09:47 +0000
commit8e339303f40bcb80c7bdddb2237b18cd21fc8586 (patch)
treef80dba20631667e5d31781572d5ed21b31c2bb59 /src
parent7554590250aba22de37722ac7c8dba11414de400 (diff)
downloademacs-8e339303f40bcb80c7bdddb2237b18cd21fc8586.tar.gz
emacs-8e339303f40bcb80c7bdddb2237b18cd21fc8586.zip
(get_boot_time): Don't use BUFSIZ.
Diffstat (limited to 'src')
-rw-r--r--src/filelock.c4
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);