Skip to content

Commit c602726

Browse files
committed
Remove "\n" in error() calls: It is added in the function
1 parent 9676f2d commit c602726

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tcpdump.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ droproot(const char *username, const char *chroot_dir)
732732
{
733733
int ret = capng_change_id(pw->pw_uid, pw->pw_gid, CAPNG_NO_FLAG);
734734
if (ret < 0)
735-
error("capng_change_id(): return %d\n", ret);
735+
error("capng_change_id(): return %d", ret);
736736
else
737737
fprintf(stderr, "dropped privs to %s\n", username);
738738
}
@@ -1374,7 +1374,7 @@ open_interface(const char *device, netdissect_options *ndo, char *ebuf)
13741374
* specific case would be an error message that looks a bit odd.
13751375
*/
13761376
newdev[strlen(newdev)-1]++;
1377-
error("%s is not a monitor mode VAP\n"
1377+
error("%s is not a monitor mode VAP"
13781378
"To create a new monitor mode VAP use:\n"
13791379
" ifconfig %s create wlandev %s wlanmode monitor\n"
13801380
"and use %s as the tcpdump interface",
@@ -2019,7 +2019,7 @@ main(int argc, char **argv)
20192019
#if defined(HAVE_FORK) || defined(HAVE_VFORK)
20202020
zflag = optarg;
20212021
#else
2022-
error("-z cannot be used. Fork subprocess not implemented.\n");
2022+
error("-z cannot be used. Fork subprocess not implemented.");
20232023
#endif
20242024
break;
20252025

@@ -2112,12 +2112,12 @@ main(int argc, char **argv)
21122112
if (ndo->ndo_xflag && ndo->ndo_Xflag)
21132113
error("-x[x] and -X[X] are mutually exclusive.");
21142114
if (Cflag != 0 && WFileName == NULL)
2115-
error("-C cannot be used without -w.\n");
2115+
error("-C cannot be used without -w.");
21162116
if (Gflag != 0 && WFileName == NULL)
2117-
error("-G cannot be used without -w.\n");
2117+
error("-G cannot be used without -w.");
21182118
#if defined(HAVE_FORK) || defined(HAVE_VFORK)
21192119
if (zflag != NULL && (WFileName == NULL || (Cflag == 0 && Gflag == 0)))
2120-
error("-z cannot be used without -w and (-C or -G).\n");
2120+
error("-z cannot be used without -w and (-C or -G).");
21212121
#endif
21222122

21232123
if (cnt != -1)
@@ -2217,11 +2217,11 @@ main(int argc, char **argv)
22172217
VFile = fopen(VFileName, "r");
22182218

22192219
if (VFile == NULL)
2220-
error("Unable to open file: %s\n", pcap_strerror(errno));
2220+
error("Unable to open file: %s", pcap_strerror(errno));
22212221

22222222
ret = get_next_file(VFile, VFileLine);
22232223
if (!ret)
2224-
error("Nothing in %s\n", VFileName);
2224+
error("Nothing in %s", VFileName);
22252225
RFileName = VFileLine;
22262226
}
22272227

0 commit comments

Comments
 (0)