Skip to content

Commit c463923

Browse files
committed
perror does not need a newline
1 parent 2727806 commit c463923

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/zfs-util.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ int execute(char *command, char needOutput, char **output, char *param[], char n
2121
if (needPassword == 1) {
2222
// Execute password prompt
2323
if (pipe(pwpip) == -1) {
24-
perror("Cannot create password pipe\n");
24+
perror("Cannot create password pipe");
2525
exit(1);
2626
}
2727
pwpid = fork();
2828
if (pwpid == 0) {
2929
// Redirect stdout to pipe
3030
while ((dup2(pwpip[1], STDOUT_FILENO) == -1) && (errno == EINTR)) {}
3131
if (errno != 0) {
32-
perror("Cannot connect stdout to parent password pipe\n");
32+
perror("Cannot connect stdout to parent password pipe");
3333
exit(1);
3434
}
3535
// Close pipe, we won't need it anymore
@@ -45,7 +45,7 @@ int execute(char *command, char needOutput, char **output, char *param[], char n
4545
execv(SYSTEMD_ASK_PASS_EXE, cmdline);
4646
exit(254);
4747
} else if (pwpid < 0) {
48-
perror("Cannot fork\n");
48+
perror("Cannot fork");
4949
close(pwpip[0]);
5050
close(pwpip[1]);
5151
return pwpid;
@@ -55,7 +55,7 @@ int execute(char *command, char needOutput, char **output, char *param[], char n
5555
// Execute
5656
if (needOutput == 1) {
5757
if (pipe(pip) == -1) {
58-
perror("Cannot create output pipe\n");
58+
perror("Cannot create output pipe");
5959
exit(1);
6060
}
6161
}
@@ -65,7 +65,7 @@ int execute(char *command, char needOutput, char **output, char *param[], char n
6565
// Redirect password pipe to stdin
6666
while ((dup2(pwpip[0], STDIN_FILENO) == -1) && (errno == EINTR)) {}
6767
if (errno != 0) {
68-
perror("Cannot connect stdin to parent password pipe\n");
68+
perror("Cannot connect stdin to parent password pipe");
6969
exit(1);
7070
}
7171
// Close pipe, we won't need them anymore
@@ -77,7 +77,7 @@ int execute(char *command, char needOutput, char **output, char *param[], char n
7777
// Redirect stdout to pipe
7878
while ((dup2(pip[1], STDOUT_FILENO) == -1) && (errno == EINTR)) {}
7979
if (errno != 0) {
80-
perror("Cannot connect stdout to parent output pipe\n");
80+
perror("Cannot connect stdout to parent output pipe");
8181
exit(1);
8282
}
8383
// Close pipe, we won't need it anymore
@@ -91,7 +91,7 @@ int execute(char *command, char needOutput, char **output, char *param[], char n
9191
execv(command, param);
9292
exit(254);
9393
} else if (pid < 0) {
94-
perror("Cannot fork\n");
94+
perror("Cannot fork");
9595
if (needOutput == 1) {
9696
close(pip[0]);
9797
close(pip[1]);

0 commit comments

Comments
 (0)