Fix all warnings in source3 with gcc4.3.
[ira/wip.git] / librpc / ndr / ndr_basic.c
index 1d2b47c850b4e246c47f6ad07723fad79c35903b..921af15daebacb9468718a3c8c73f8579cfe2258 100644 (file)
@@ -757,8 +757,7 @@ _PUBLIC_ void ndr_print_array_uint8(struct ndr_print *ndr, const char *name,
        ndr->depth++;
        for (i=0;i<count;i++) {
                char *idx=NULL;
-               asprintf(&idx, "[%d]", i);
-               if (idx) {
+               if (asprintf(&idx, "[%d]", i) == -1) {
                        ndr_print_uint8(ndr, idx, data[i]);
                        free(idx);
                }