rc = USED;
if ((fp = fopen("/proc/net/unix", "r")) == 0)
goto done;
- fgets(buf, sizeof(buf), fp); /* skip header */
+ if (!fgets(buf, sizeof(buf), fp)) goto done; /* skip header */
len = strlen(sun->sun_path);
while (fgets(buf, sizeof(buf), fp)) {
n = strlen(buf);
}
/* Print the given message to standard error. Avoids stdio. */
-static void printerr(const char *p) { write(STDERR_FILENO, p, strlen(p)); }
+static void printerr(const char *p)
+ { int hunoz; hunoz = write(STDERR_FILENO, p, strlen(p)); }
/* Create the socket directory, being careful about permissions. */
static void create_sockdir(void)