Skip to content

Commit

Permalink
pulse: fix compiler warning
Browse files Browse the repository at this point in the history
  • Loading branch information
marmarek committed Apr 9, 2020
1 parent f931fb8 commit aa84bf6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pulse/pacat-simple-vchan.c
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,11 @@ static int create_pidfile(int domid, char **pidfile_path, int *pidfile_fd)
}

ret = snprintf(pid_s, sizeof(pid_s), "%d\n", getpid());
write(fd, pid_s, ret);
if (write(fd, pid_s, ret) != ret) {
pacat_log("Failed to write a pid file: %s", pa_strerror(errno));
close(fd);
return -1;
}

*pidfile_fd = fd;
return 0;
Expand Down

0 comments on commit aa84bf6

Please sign in to comment.