diff --git a/sts.c b/sts.c --- a/sts.c +++ b/sts.c @@ -34,6 +34,10 @@ time_t now = time (NULL); FILE *f = fopen ("/proc/uptime", "r"); + if (f == NULL) { + perror ("FOPEN"); + return EXIT_FAILURE; + } if (fgets (buf, sizeof (buf), f) == NULL) { perror ("FOPEN"); exit (errno);