- null check
authorMatthias Wachs <wachs@net.in.tum.de>
Thu, 22 Mar 2012 12:33:38 +0000 (12:33 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Thu, 22 Mar 2012 12:33:38 +0000 (12:33 +0000)
src/namestore/namestore_common.c

index 023f20f431e8772e84f2110674dbcdbee9cd1886..0b6f4eb931758ad10f65c0d2b59948405269b770 100644 (file)
@@ -286,10 +286,11 @@ GNUNET_NAMESTORE_create_signature (const struct GNUNET_CRYPTO_RsaPrivateKey *key
 int
 GNUNET_NAMESTORE_check_name (const char * name)
 {
-  int res = GNUNET_OK;
+  if (name == NULL)
+    return GNUNET_SYSERR;
   if (strlen (name) > 63)
-    res = GNUNET_SYSERR;
-  return res;
+    return GNUNET_SYSERR;
+  return GNUNET_OK;
 }