-removing 2nd argument from GNUNET_CLIENT_disconnect as it was virtually always GNUNE...
[oweals/gnunet.git] / src / util / pseudonym.c
index dd8ad08b3b6b3b784bf56a407a1ae6c4bc1c1e70..d2efdc98f8fa58dfb4752d59f9c3e6f2042f24b4 100644 (file)
@@ -288,6 +288,7 @@ read_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
   return GNUNET_OK;
 }
 
+
 /**
  * Return unique variant of the namespace name.
  * Use it after GNUNET_PSEUDONYM_get_info() to make sure
@@ -319,7 +320,7 @@ GNUNET_PSEUDONYM_name_uniquify (const struct GNUNET_CONFIGURATION_Handle *cfg,
 
   len = 0;
   if (0 == STAT (fn, &sbuf))
-    GNUNET_DISK_file_size (fn, &len, GNUNET_YES);
+    GNUNET_break (GNUNET_OK == GNUNET_DISK_file_size (fn, &len, GNUNET_YES, GNUNET_YES));
   fh = GNUNET_DISK_file_open (fn,
                               GNUNET_DISK_OPEN_CREATE |
                               GNUNET_DISK_OPEN_READWRITE,
@@ -461,7 +462,7 @@ GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg,
 
   idx = -1;
   slen = strlen (ns_uname);
-  while ((slen > 0) && (1 != sscanf (&ns_uname[slen - 1], "-%u", &idx)))
+  while ((slen > 0) && (1 != SSCANF (&ns_uname[slen - 1], "-%u", &idx)))
     slen--;
   if (slen == 0)
     return GNUNET_SYSERR;
@@ -474,7 +475,7 @@ GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg,
   GNUNET_assert (fn != NULL);
 
   if ((GNUNET_OK != GNUNET_DISK_file_test (fn) ||
-       (GNUNET_OK != GNUNET_DISK_file_size (fn, &len, GNUNET_YES))) ||
+       (GNUNET_OK != GNUNET_DISK_file_size (fn, &len, GNUNET_YES, GNUNET_YES))) ||
       ((idx + 1) * sizeof (GNUNET_HashCode) > len))
   {
     GNUNET_free (fn);