mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-22 05:51:11 -07:00
(get_boot_time): Don't use BUFSIZ.
This commit is contained in:
parent
7554590250
commit
8e339303f4
1 changed files with 2 additions and 2 deletions
|
|
@ -116,12 +116,12 @@ get_boot_time ()
|
|||
|
||||
while ((fd = open ("/proc/uptime", O_RDONLY)) >= 0)
|
||||
{
|
||||
char buf[BUFSIZ];
|
||||
char buf[100];
|
||||
int res;
|
||||
double upsecs;
|
||||
time_t uptime;
|
||||
|
||||
read (fd, buf, BUFSIZ);
|
||||
read (fd, buf, sizeof buf);
|
||||
close (fd);
|
||||
|
||||
res = sscanf (buf, "%lf", &upsecs);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue