-/* $OpenBSD: dev-limit.c,v 1.1 2023/07/06 19:55:58 sashan Exp $ */
+/* $OpenBSD: dev-limit.c,v 1.2 2023/07/10 17:45:17 anton Exp $ */
/*
* Copyright (c) 2023 Alexandr Nedvedicky <sashan@openbsd.org>
signal(SIGCHLD, handle_sigchild);
pids = (pid_t *)malloc(sizeof(pid_t) * chld_count);
if (pids == 0)
- err(1, "%s malloc: ", argv[0]);
+ err(1, NULL);
i = 0;
while ((sigchild == 0) && (i < chld_count)) {
-/* $OpenBSD: iocmd-limit.c,v 1.1 2023/07/06 19:55:58 sashan Exp $ */
+/* $OpenBSD: iocmd-limit.c,v 1.2 2023/07/10 17:45:17 anton Exp $ */
/*
* Copyright (c) 2023 Alexandr Nedvedicky <sashan@openbsd.org>
* exit right away.
*/
if (errno != EBUSY)
- err(1, "%s DIOCGETRULES: ", __func__);
+ err(1, "%s DIOCGETRULES", __func__);
}
return (rv);
pr.rule.action = PF_PASS;
if ((rv = ioctl(dev, DIOCGETRULES, &pr)) == -1)
- warn("%s DIOCGETRULES: ", __func__);
+ warn("%s DIOCGETRULES", __func__);
else if ((rv = ioctl(dev, DIOCXEND, &pr.ticket)) == -1)
- warn("%s DIOCXEND: ", __func__);
+ warn("%s DIOCXEND", __func__);
return (rv);
}
dev = open("/dev/pf", O_RDONLY);
if (dev < 0)
- err(1, "open(\"dev/pf\"): ");
+ err(1, "open(\"dev/pf\")");
while (i < iterations) {
if (test_iocmd->iocmd_test(dev) != 0)