REST: nothing triggers rest
[oweals/gnunet.git] / src / my / my_result_helper.c
index bee6e33044f73c5952e1cd971863324e520e5422..75a3400144dd12ccb30a6a73f97215436c0534bb 100644 (file)
@@ -2,16 +2,20 @@
   This file is part of GNUnet
   Copyright (C) 2014, 2015, 2016 GNUnet e.V.
 
-  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 3, or (at your option) any later version.
-
-  GNUnet is distributed in the hope that it will be useful, but WITHOUT ANY
-  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-  A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License along with
-  GNUnet; see the file COPYING.  If not, If not, see <http://www.gnu.org/licenses/>
+  GNUnet is free software: you can redistribute it and/or modify it
+  under the terms of the GNU Affero General Public License as published
+  by the Free Software Foundation, either version 3 of the License,
+  or (at your option) any later version.
+
+  GNUnet is distributed in the hope that it will be useful, but
+  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 my/my_result_helper.c
@@ -554,7 +558,7 @@ post_extract_string (void * cls,
     return GNUNET_SYSERR;
   if (*results->is_null)
   {
-    rs->dst = NULL;
+    *(void **) rs->dst = NULL;
     return GNUNET_OK;
   }
 
@@ -572,7 +576,8 @@ post_extract_string (void * cls,
     GNUNET_free (buf);
     return GNUNET_SYSERR;
   }
-  rs->dst = buf;
+  buf[size] = '\0';
+  *(void **) rs->dst = buf;
   return GNUNET_OK;
 }
 
@@ -865,4 +870,4 @@ GNUNET_MY_result_spec_uint64 (uint64_t *u64)
 }
 
 
-/* end of pq_result_helper.c */
+/* end of my_result_helper.c */