From: Willem Toorop Date: Wed, 30 Nov 2016 16:10:23 +0000 (+0100) Subject: Mac compiler warnings X-Git-Tag: release-1.7.0-rc1~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0e3528afe0896dbc65720add535143161fc08dd;p=thirdparty%2Fldns.git Mac compiler warnings --- diff --git a/examples/ldns-dpa.c b/examples/ldns-dpa.c index f60e7703..356b7eea 100644 --- a/examples/ldns-dpa.c +++ b/examples/ldns-dpa.c @@ -920,7 +920,7 @@ match_opcode(type_operator operator, a = lt->id; } else { i = atoi(value); - if (i >= 0 && !isdigit((unsigned char)value[0]) == 0) { + if (i >= 0 && isdigit((unsigned char)value[0])) { lt = ldns_lookup_by_id(ldns_opcodes, i); if (lt) { a = lt->id; @@ -941,7 +941,7 @@ match_opcode(type_operator operator, b = lt->id; } else { i = atoi(mvalue); - if (i >= 0 && !isdigit((unsigned char)mvalue[0]) == 0) { + if (i >= 0 && isdigit((unsigned char)mvalue[0])) { lt = ldns_lookup_by_id(ldns_opcodes, i); if (lt) { b = lt->id; @@ -1053,7 +1053,7 @@ match_rcode(type_operator operator, a = lt->id; } else { i = atoi(value); - if (i >= 0 && !isdigit((unsigned char)value[0]) == 0) { + if (i >= 0 && isdigit((unsigned char)value[0])) { lt = ldns_lookup_by_id(ldns_rcodes, i); if (lt) { a = lt->id; @@ -1074,8 +1074,7 @@ match_rcode(type_operator operator, b = lt->id; } else { i = atoi(mvalue); - - if (i >= 0 && !isdigit((unsigned char)mvalue[0]) == 0) { + if (i >= 0 && isdigit((unsigned char)mvalue[0])) { lt = ldns_lookup_by_id(ldns_rcodes, i); if (lt) { b = lt->id; diff --git a/examples/ldns-walk.c b/examples/ldns-walk.c index d3d91bab..2afe24e2 100644 --- a/examples/ldns-walk.c +++ b/examples/ldns-walk.c @@ -259,7 +259,7 @@ main(int argc, char *argv[]) full = true; } else if (strncmp(argv[i], "-s", 3) == 0) { if (i + 1 < argc) { - if (!ldns_str2rdf_dname(&startpoint, argv[i + 1]) == LDNS_STATUS_OK) { + if (ldns_str2rdf_dname(&startpoint, argv[i + 1]) != LDNS_STATUS_OK) { printf("Bad start point name: %s\n", argv[i + 1]); exit(1); }