-fixes
[oweals/gnunet.git] / src / util / os_installation.c
index ddd40fc00a95ba26282cc35f3629058d3efa7e6d..e790ce10eec9b46a187431a5d0e1ccab86248ff2 100644 (file)
@@ -62,7 +62,7 @@ get_path_from_proc_maps ()
   while (NULL != fgets (line, sizeof (line), f))
   {
     if ((1 ==
-         sscanf (line, "%*x-%*x %*c%*c%*c%*c %*x %*2u:%*2u %*u%*[ ]%s", dir)) &&
+         SSCANF (line, "%*x-%*x %*c%*c%*c%*c %*x %*2u:%*2u %*u%*[ ]%s", dir)) &&
         (NULL != (lgu = strstr (dir, "libgnunetutil"))))
     {
       lgu[0] = '\0';
@@ -471,7 +471,7 @@ GNUNET_OS_check_helper_binary (const char *binary)
     GNUNET_free (p);
     p = pf;
   }
-  free (binaryexe);
+  GNUNET_free (binaryexe);
 #else
   p = get_path_from_PATH (binary);
   if (p != NULL)
@@ -494,12 +494,14 @@ GNUNET_OS_check_helper_binary (const char *binary)
     GNUNET_free (p);
     return GNUNET_SYSERR;
   }
+#ifndef MINGW
   if (0 == getuid ())
   {
     /* as we run as root, we don't insist on SUID */
     GNUNET_free (p);
     return GNUNET_OK;
   }
+#endif
   if (0 != STAT (p, &statbuf))
   {
     LOG (GNUNET_ERROR_TYPE_WARNING, _("stat (%s) failed: %s\n"), p,