first step to remove plibc
[oweals/gnunet.git] / src / datacache / test_datacache_quota.c
index 21e37360867b4089e8cee01bd34fe7b2cde7e1db..0201df3b3610b29ec138d2063eb8de68b14d5904 100644 (file)
      WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      Affero General Public License for more details.
-    
+
      You should have received a copy of the GNU Affero General Public License
      along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+     SPDX-License-Identifier: AGPL3.0-or-later
 */
 /*
  * @file datacache/test_datacache_quota.c
@@ -61,7 +63,7 @@ run (void *cls,
 
   if (h == NULL)
   {
-    FPRINTF (stderr,
+    fprintf (stderr,
              "%s",
              "Failed to initialize datacache.  Database likely not setup, skipping test.\n");
     return;
@@ -71,7 +73,7 @@ run (void *cls,
   memset (&k, 0, sizeof (struct GNUNET_HashCode));
   for (unsigned int i = 0; i < 10; i++)
   {
-    FPRINTF (stderr,
+    fprintf (stderr,
              "%s",
              ".");
     GNUNET_CRYPTO_hash (&k,
@@ -95,11 +97,11 @@ run (void *cls,
     }
     k = n;
   }
-  FPRINTF (stderr, "%s",  "\n");
+  fprintf (stderr, "%s",  "\n");
   memset (&k, 0, sizeof (struct GNUNET_HashCode));
   for (unsigned int i = 0; i < 10; i++)
   {
-    FPRINTF (stderr, "%s",  ".");
+    fprintf (stderr, "%s",  ".");
     GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n);
     if (i < 2)
       ASSERT (0 == GNUNET_DATACACHE_get (h, &k, 1 + i, NULL, NULL));
@@ -107,7 +109,7 @@ run (void *cls,
       ASSERT (0 < GNUNET_DATACACHE_get (h, &k, 1 + i, NULL, NULL));
     k = n;
   }
-  FPRINTF (stderr, "%s",  "\n");
+  fprintf (stderr, "%s",  "\n");
   GNUNET_DATACACHE_destroy (h);
   return;
 FAILURE:
@@ -121,7 +123,7 @@ int
 main (int argc,
       char *argv[])
 {
-  char cfg_name[128];
+  char cfg_name[PATH_MAX];
   char *const xargv[] = {
     "test-datacache-quota",
     "-c",
@@ -150,7 +152,7 @@ main (int argc,
                      &run,
                      NULL);
   if (0 != ok)
-    FPRINTF (stderr,
+    fprintf (stderr,
             "Missed some testcases: %d\n",
             ok);
   return ok;