fixing block reconstruction start/shutdown code
[oweals/gnunet.git] / src / fs / fs_getopt.c
index f985ed8d0555c474f4a743b105bfa88a181b3cb5..0db7237f7357d677d649272c0e808ee781af6bf3 100644 (file)
@@ -4,7 +4,7 @@
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
@@ -104,9 +104,9 @@ GNUNET_FS_getopt_set_keywords (struct GNUNET_GETOPT_CommandLineProcessorContext*
           strcat (val, value);
         }
     }
-  GNUNET_array_grow (u->data.ksk.keywords,
-                     u->data.ksk.keywordCount, u->data.ksk.keywordCount + 1);
-  u->data.ksk.keywords[u->data.ksk.keywordCount - 1] = val;
+  GNUNET_array_append (u->data.ksk.keywords,
+                      u->data.ksk.keywordCount,
+                      val);
   return GNUNET_OK;
 }
 
@@ -144,13 +144,13 @@ GNUNET_FS_getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext*
       *mm = meta;
     }
 
-  tmp = GNUNET_STRINGS_to_utf8 (value, strlen (value),
 #if ENABLE_NLS
-                               nl_langinfo (CODESET)
+  tmp = GNUNET_STRINGS_to_utf8 (value, strlen (value),
+                               nl_langinfo (CODESET));
 #else
-                               "utf-8"
+  tmp = GNUNET_STRINGS_to_utf8 (value, strlen (value),
+                               "utf-8");
 #endif
-    );
   type = EXTRACTOR_metatype_get_max ();
   while (type > 0)
     {