Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F132616590
D47132.id145000.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D47132.id145000.diff
View Options
diff --git a/tests/sys/netpfil/common/divapp.c b/tests/sys/netpfil/common/divapp.c
--- a/tests/sys/netpfil/common/divapp.c
+++ b/tests/sys/netpfil/common/divapp.c
@@ -83,8 +83,8 @@
s = select(c->fd + 1, &readfds, 0, 0, &timeout);
if (s == -1)
errx(EX_IOERR, "recv_pkt: select() errors.");
- if (s != 1) // timeout
- return -1;
+ if (s != 1) /* timeout */
+ return (-1);
c->pkt_n = recvfrom(c->fd, c->pkt, sizeof(c->pkt), 0,
(struct sockaddr *) &c->sin, &c->sin_len);
@@ -98,14 +98,11 @@
send_pkt(struct context *c)
{
ssize_t n;
- char errstr[32];
n = sendto(c->fd, c->pkt, c->pkt_n, 0,
(struct sockaddr *) &c->sin, c->sin_len);
- if (n == -1) {
- strerror_r(errno, errstr, sizeof(errstr));
- errx(EX_IOERR, "send_pkt: sendto() errors: %d %s.", errno, errstr);
- }
+ if (n == -1)
+ err(EX_IOERR, "send_pkt: sendto() errors");
if (n != c->pkt_n)
errx(EX_IOERR, "send_pkt: sendto() sent %zd of %zd bytes.",
n, c->pkt_n);
@@ -145,5 +142,5 @@
if (npkt != 1)
errx(EXIT_FAILURE, "%d: npkt=%d.", c.divert_port, npkt);
- return EXIT_SUCCESS;
+ return (EXIT_SUCCESS);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 19, 11:23 AM (15 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23923127
Default Alt Text
D47132.id145000.diff (1 KB)
Attached To
Mode
D47132: tests: Fix style of netpfil/common/divapp.c
Attached
Detach File
Event Timeline
Log In to Comment