Wrong assertion/comparison: Compare value not pointer
authorOlaf Flebbe <o.flebbe@science-computing.de>
Thu, 12 Apr 2012 09:29:41 +0000 (11:29 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 13 Apr 2012 00:23:35 +0000 (02:23 +0200)
Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Apr 13 02:23:36 CEST 2012 on sn-devel-104

source3/registry/reg_parse.c

index a112572b558504f4d0d2f4c80f10f7b545aac5b7..5a22fd799848ae54f6d3a82f73f70ee4a0fa26e6 100644 (file)
@@ -791,12 +791,12 @@ handle_iconv_errno(int err, const char* obuf, size_t linenum,
        DEBUG(0, ("Illegal multibyte sequence at line %lu: %s",
                  (long unsigned)(linenum+1), pos));
 
-       assert(ilen > 0);
+       assert((*ilen) > 0);
        do {
                size_t il = 1;
                DEBUGADD(0, ("<%02x>", (unsigned char)**iptr));
 
-               if (olen > 0) {
+               if ((*olen) > 0) {
                        *(*optr)++ = '\?';
                        (*iptr)++;
                        /* Todo: parametrize, e.g. skip: *optr++ = *iptr++; */