@@ -199,7 +199,7 @@ static void log_address(const char *desc, struct sockaddr *sa)
199
199
if (sa -> sa_family == AF_INET ) {
200
200
struct sockaddr_in * s = (struct sockaddr_in * ) sa ;
201
201
202
- log_msg ("%s %s:%d" ,
202
+ log_msg ("%s %s:%d\n " ,
203
203
desc ,
204
204
inet_ntop (AF_INET , & s -> sin_addr , addrstr ,
205
205
sizeof (addrstr )),
@@ -208,15 +208,13 @@ static void log_address(const char *desc, struct sockaddr *sa)
208
208
} else if (sa -> sa_family == AF_INET6 ) {
209
209
struct sockaddr_in6 * s6 = (struct sockaddr_in6 * ) sa ;
210
210
211
- log_msg ("%s [%s]:%d" ,
211
+ log_msg ("%s [%s]:%d\n " ,
212
212
desc ,
213
213
inet_ntop (AF_INET6 , & s6 -> sin6_addr , addrstr ,
214
214
sizeof (addrstr )),
215
215
ntohs (s6 -> sin6_port ));
216
216
}
217
217
218
- printf ("\n" );
219
-
220
218
fflush (stdout );
221
219
}
222
220
@@ -594,7 +592,7 @@ static int expected_addr_match(struct sockaddr *sa, void *expected,
594
592
struct in_addr * exp_in = (struct in_addr * ) expected ;
595
593
596
594
if (s -> sin_addr .s_addr != exp_in -> s_addr ) {
597
- log_error ("%s address does not match expected %s" ,
595
+ log_error ("%s address does not match expected %s\n " ,
598
596
desc ,
599
597
inet_ntop (AF_INET , exp_in ,
600
598
addrstr , sizeof (addrstr )));
@@ -605,14 +603,14 @@ static int expected_addr_match(struct sockaddr *sa, void *expected,
605
603
struct in6_addr * exp_in = (struct in6_addr * ) expected ;
606
604
607
605
if (memcmp (& s6 -> sin6_addr , exp_in , sizeof (* exp_in ))) {
608
- log_error ("%s address does not match expected %s" ,
606
+ log_error ("%s address does not match expected %s\n " ,
609
607
desc ,
610
608
inet_ntop (AF_INET6 , exp_in ,
611
609
addrstr , sizeof (addrstr )));
612
610
rc = 1 ;
613
611
}
614
612
} else {
615
- log_error ("%s address does not match expected - unknown family" ,
613
+ log_error ("%s address does not match expected - unknown family\n " ,
616
614
desc );
617
615
rc = 1 ;
618
616
}
@@ -731,7 +729,7 @@ static int convert_addr(struct sock_args *args, const char *_str,
731
729
}
732
730
break ;
733
731
default :
734
- log_error ("unknown address type" );
732
+ log_error ("unknown address type\n " );
735
733
exit (1 );
736
734
}
737
735
0 commit comments