X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=blob.c;h=339897cb1faf89fc4337e08605fd45122eeba697;hp=ca39de0db5fc8fdb15009d0ed1c46ec14ca15087;hb=74592ed100009a2d73e03861ae9626363f06aca9;hpb=d2b2c210d1e388a29cef3d8189d6d80f3299b439 diff --git a/blob.c b/blob.c index ca39de0d..339897cb 100644 --- a/blob.c +++ b/blob.c @@ -9,6 +9,7 @@ #include #include #include +#include #include "para.h" #include "error.h" @@ -262,7 +263,7 @@ static int com_rmblob_callback(struct osl_table *table, if (pmd.num_matches == 0) ret = -E_NO_MATCH; else { - para_printf(&aca->pbout, "removed %d blob(s)\n", + para_printf(&aca->pbout, "removed %u blob(s)\n", pmd.num_matches); ret = afs_event(BLOB_REMOVE, NULL, table); } @@ -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; }