aboutsummaryrefslogtreecommitdiff
path: root/src/fs/fs_uri.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-03-06 15:19:58 +0000
committerChristian Grothoff <christian@grothoff.org>2013-03-06 15:19:58 +0000
commit7c8722c2d04ace69773676a7d01d0dea0e8cf478 (patch)
treec788ccb2ad57f4d9d3dc13794f5e727061e5f911 /src/fs/fs_uri.c
parent60d15a9c381f64552a963aa18a557874f3b5c280 (diff)
downloadgnunet-7c8722c2d04ace69773676a7d01d0dea0e8cf478.tar.gz
gnunet-7c8722c2d04ace69773676a7d01d0dea0e8cf478.zip
-fix
Diffstat (limited to 'src/fs/fs_uri.c')
-rw-r--r--src/fs/fs_uri.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c
index 9d8691b76..a3a54227f 100644
--- a/src/fs/fs_uri.c
+++ b/src/fs/fs_uri.c
@@ -940,16 +940,19 @@ GNUNET_FS_uri_sks_create (struct GNUNET_FS_Namespace *ns, const char *id,
940 struct GNUNET_FS_Uri *ns_uri; 940 struct GNUNET_FS_Uri *ns_uri;
941 941
942 if (NULL == id) 942 if (NULL == id)
943 { 943 {
944 *emsg = GNUNET_strdup (_("identifier is NULL!")); 944 if (NULL != emsg)
945 *emsg = GNUNET_strdup (_("identifier is NULL!"));
945 return NULL; 946 return NULL;
946 } 947 }
947 else if ('\0' == id[0]) 948 else if ('\0' == id[0])
948 { 949 {
949 *emsg = GNUNET_strdup (_("identifier has zero length!")); 950 if (NULL != emsg)
951 *emsg = GNUNET_strdup (_("identifier has zero length!"));
950 return NULL; 952 return NULL;
951 } 953 }
952 *emsg = NULL; 954 if (NULL != emsg)
955 *emsg = NULL;
953 ns_uri = GNUNET_malloc (sizeof (struct GNUNET_FS_Uri)); 956 ns_uri = GNUNET_malloc (sizeof (struct GNUNET_FS_Uri));
954 ns_uri->type = GNUNET_FS_URI_SKS; 957 ns_uri->type = GNUNET_FS_URI_SKS;
955 GNUNET_FS_namespace_get_public_identifier (ns, &ns_uri->data.sks.ns); 958 GNUNET_FS_namespace_get_public_identifier (ns, &ns_uri->data.sks.ns);