Commit 07e0094365e8dc360a83eec2e7cf9b1d5d8d6d00

Andrew Bird (Sphere Systems) ajb at
Thu Jan 1 12:27:49 GMT 2009

Hi guys,
	This doesn't seem right; isn't the sense of the test wrong? Seems to me we 
are printing and freeing the string if we failed

Best regards


diff --git a/librpc/ndr/ndr_basic.c b/librpc/ndr/ndr_basic.c
 index 1d2b47c..921af15 100644 (file)
--- a/librpc/ndr/ndr_basic.c
+++ b/librpc/ndr/ndr_basic.c
@@ -757,8 +757,7 @@ _PUBLIC_ void ndr_print_array_uint8(struct ndr_print *ndr, 
const char *name,
        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]);

More information about the samba-technical mailing list