Skip to content

Commit c16e7f2

Browse files
committed
Errors print to stderr
1 parent c14df0a commit c16e7f2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

distrans.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#include <stdlib.h>
33
#include <string.h>
44
#include <unistd.h>
5-
65
#include <sys/types.h>
76
#include <sys/socket.h>
87
#include <arpa/inet.h>
@@ -22,7 +21,7 @@ void forbidden(int socket) {
2221
}
2322

2423
void error(char *msg) {
25-
(void)printf("ERROR: %s", msg);
24+
(void)fprintf(stderr, "ERROR: %s\n", msg);
2625
exit(1);
2726
}
2827

0 commit comments

Comments
 (0)