]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Print the optional packet count (--count) to stdout instead of stderr
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 4 Nov 2020 11:15:14 +0000 (12:15 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 4 Nov 2020 11:28:12 +0000 (12:28 +0100)
It is not an error, thus print it to stdout.

[skip ci]

tcpdump.c

index 658d8b34ec0124ebfc289f5edbe0a49089cd9d82..6476a3d4844003525bfcd58200f722dfc4bc58b7 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -2636,7 +2636,7 @@ DIAG_ON_CLANG(assign-enum)
        while (ret != NULL);
 
        if (count_mode && RFileName != NULL)
-               fprintf(stderr, "%u packet%s\n", packets_captured,
+               fprintf(stdout, "%u packet%s\n", packets_captured,
                        PLURAL_SUFFIX(packets_captured));
 
        free(cmdbuf);