]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Fix some "Unchecked return value" found by Coverity
authorFrancois-Xavier Le Bail <[email protected]>
Sun, 1 Nov 2020 14:48:55 +0000 (15:48 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Sun, 1 Nov 2020 14:50:00 +0000 (15:50 +0100)
print-bfd.c
print-openflow-1.0.c
print-radius.c
print-rpki-rtr.c

index 04164e316525f4a8965c215920c073d7eebb10a1..8c047357db3ed65ffc262ae2723c2e70be86a75c 100644 (file)
@@ -222,7 +222,7 @@ auth_print(netdissect_options *ndo, const u_char *pptr)
                 pptr++;
                 ND_PRINT(", Password: ");
                 /* the length is equal to the password length plus three */
-                nd_printn(ndo, pptr, auth_len - 3, NULL);
+                (void)nd_printn(ndo, pptr, auth_len - 3, NULL);
                 break;
             case AUTH_MD5:
             case AUTH_MET_MD5:
index 1d9bcdaf8a286ac0fc33c98ecb2a23286a1ad140..aaef064912d02e3bf0387f573619379d8f774a21 100644 (file)
@@ -828,7 +828,7 @@ of10_bsn_message_print(netdissect_options *ndo,
                OF_FWD(4);
                /* data */
                ND_PRINT(", data '");
-               nd_printn(ndo, cp, len, NULL);
+               (void)nd_printn(ndo, cp, len, NULL);
                ND_PRINT("'");
                break;
        case BSN_SHELL_OUTPUT:
@@ -845,7 +845,7 @@ of10_bsn_message_print(netdissect_options *ndo,
                /* already checked that len >= 4 */
                /* data */
                ND_PRINT(", data '");
-               nd_printn(ndo, cp, len, NULL);
+               (void)nd_printn(ndo, cp, len, NULL);
                ND_PRINT("'");
                break;
        case BSN_SHELL_STATUS:
index ee16877f6e5de3c71bbbc0462201ba6370665e26..c87fa900f392e9a32f84d55ad83130315182cb41 100644 (file)
@@ -1135,7 +1135,7 @@ print_attr_operator_name(netdissect_options *ndo,
    data++;
    ND_PRINT("[%s] ", tok2str(operator_name_vector, "unknown namespace %u", namespace_value));
 
-   nd_printn(ndo, data, length - 1, NULL);
+   (void)nd_printn(ndo, data, length - 1, NULL);
 
    return;
 
@@ -1183,7 +1183,7 @@ print_attr_location_information(netdissect_options *ndo,
    data += 8;
 
    ND_PRINT("method \"");
-   nd_printn(ndo, data, length - 20, NULL);
+   (void)nd_printn(ndo, data, length - 20, NULL);
    ND_PRINT("\"");
 
    return;
@@ -1247,7 +1247,7 @@ print_basic_location_policy_rules(netdissect_options *ndo,
 
    if (length > 10) {
       ND_PRINT(", note well \"");
-      nd_printn(ndo, data, length - 10, NULL);
+      (void)nd_printn(ndo, data, length - 10, NULL);
       ND_PRINT("\"");
    }
 
index 962c0bfaab4b5e86db397bdeaf010986b027c8f7..36be3998a32626cd82c26102709c2ce63038c93e 100644 (file)
@@ -349,7 +349,7 @@ rpki_rtr_pdu_print(netdissect_options *ndo, const u_char *tptr, const u_int len,
                    goto invalid;
                /* nd_printn() makes the bounds check */
                ND_PRINT("%sError text: ", indent_string(indent+2));
-               nd_printn(ndo, tptr + tlen, text_length, NULL);
+               (void)nd_printn(ndo, tptr + tlen, text_length, NULL);
            }
        }
        break;