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);
{
char buf[INET_ADDRSTRLEN + 16];
char *p;
- size_t n = strlen(sockdir), nn = strlen(sun->sun_path);
+ size_t n = strlen(sockdir), nn;
struct sockaddr_in sin_mine;
unsigned long port;
sin = &sin_mine;
if (sun->sun_family != AF_UNIX)
return (-1);
+ nn = strlen(sun->sun_path);
if (len < sizeof(sun)) ((char *)sun)[len] = 0;
D( fprintf(stderr, "noip: decode (%d) `%s'",
*sun->sun_path, sun->sun_path); )
}
/* 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)