sts.c
changeset 156 2898369b1cdc
parent 145 63a5269fb113
--- 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);