]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-atalk.c
Add a status exit code to the function ndo_error()
[tcpdump] / print-atalk.c
index 25a1801a9cba0748c2e081b0a40467e37697a2ee..3cd04177b4f276f62a7cf66b4ca384a15014d628 100644 (file)
@@ -608,8 +608,8 @@ ataddr_string(netdissect_options *ndo,
                        tp->nxt = newhnamemem(ndo);
                        tp->name = strdup(nambuf);
                        if (tp->name == NULL)
-                               (*ndo->ndo_error)(ndo,
-                                                 "ataddr_string: strdup(nambuf)");
+                               (*ndo->ndo_error)(ndo, S_ERR_ND_MEM_ALLOC,
+                                       "ataddr_string: strdup(nambuf)");
                }
                fclose(fp);
        }
@@ -628,8 +628,8 @@ ataddr_string(netdissect_options *ndo,
                            tp2->name, athost);
                        tp->name = strdup(nambuf);
                        if (tp->name == NULL)
-                               (*ndo->ndo_error)(ndo,
-                                                 "ataddr_string: strdup(nambuf)");
+                               (*ndo->ndo_error)(ndo, S_ERR_ND_MEM_ALLOC,
+                                       "ataddr_string: strdup(nambuf)");
                        return (tp->name);
                }
 
@@ -641,7 +641,8 @@ ataddr_string(netdissect_options *ndo,
                (void)nd_snprintf(nambuf, sizeof(nambuf), "%u", atnet);
        tp->name = strdup(nambuf);
        if (tp->name == NULL)
-               (*ndo->ndo_error)(ndo, "ataddr_string: strdup(nambuf)");
+               (*ndo->ndo_error)(ndo, S_ERR_ND_MEM_ALLOC,
+                                 "ataddr_string: strdup(nambuf)");
 
        return (tp->name);
 }