]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Mac compiler warnings
authorWillem Toorop <willem@nlnetlabs.nl>
Wed, 30 Nov 2016 16:10:23 +0000 (17:10 +0100)
committerWillem Toorop <willem@nlnetlabs.nl>
Wed, 30 Nov 2016 16:10:23 +0000 (17:10 +0100)
examples/ldns-dpa.c
examples/ldns-walk.c

index f60e77037c984339ccf4f78689e6e9d6b061f100..356b7eea759d703e8c714b3eda1c4048fceef18e 100644 (file)
@@ -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;
index d3d91bab66258f17fb1ea972c86c6547402522c7..2afe24e24aed899bb9087d76fc3653de5de0c9a6 100644 (file)
@@ -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);
                                        }