X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=blob.c;h=339897cb1faf89fc4337e08605fd45122eeba697;hp=7a7ae756cb834ef998f37b8b88a781537392e4d3;hb=1709cc8f8a54429441f8f83c38146e667133c727;hpb=b52342d0b5df5446f149f0c1daf26f6e25b2aba7 diff --git a/blob.c b/blob.c index 7a7ae756..339897cb 100644 --- a/blob.c +++ b/blob.c @@ -9,6 +9,7 @@ #include #include #include +#include #include "para.h" #include "error.h" @@ -487,7 +488,8 @@ static int blob_get_name_by_id(struct osl_table *table, uint32_t id, struct osl_object obj = {.data = &id, .size = sizeof(id)}; int ret; - *name = NULL; + if (name) + *name = NULL; if (!id) return 1; ret = osl(osl_get_row(table, BLOBCOL_ID, &obj, &row)); @@ -498,7 +500,8 @@ static int blob_get_name_by_id(struct osl_table *table, uint32_t id, return ret; if (*(char *)obj.data == '\0') return -E_DUMMY_ROW; - *name = (char *)obj.data; + if (name) + *name = (char *)obj.data; return 1; }