Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/ping6 Fix some printf format problems.



details:   https://anonhg.NetBSD.org/src/rev/c2e931b37680
branches:  trunk
changeset: 474236:c2e931b37680
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Jul 02 00:19:44 1999 +0000

description:
Fix some printf format problems.

diffstat:

 sbin/ping6/ping6.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 0d88481ad86e -r c2e931b37680 sbin/ping6/ping6.c
--- a/sbin/ping6/ping6.c        Fri Jul 02 00:04:53 1999 +0000
+++ b/sbin/ping6/ping6.c        Fri Jul 02 00:19:44 1999 +0000
@@ -319,7 +319,7 @@
                case 'f':
                        if (getuid()) {
                                errno = EPERM;
-                               err(1, NULL);
+                               errx(1, "Must be superuser to flood ping");
                        }
                        options |= F_FLOOD;
                        setbuf(stdout, (char *)NULL);
@@ -434,7 +434,7 @@
                timing = 1;
        packlen = datalen + IP6LEN + ICMP6ECHOLEN + EXTRA;
        if (!(packet = (u_char *)malloc((u_int)packlen)))
-               err(1, NULL);
+               err(1, "Unable to allocate packet");
        if (!(options & F_PINGFILLED))
                for (i = 8; i < datalen; ++i)
                        *datap++ = i;
@@ -467,7 +467,7 @@
                if ((len = ipsec_set_policy(buf, len, policy)) < 0)
                        errx(1, ipsec_strerror());
                if (setsockopt(s, IPPROTO_IPV6, IPV6_IPSEC_POLICY, buf, len) < 0)
-                       err(1, NULL);
+                       err(1, "Unable to set IPSec policy");
                free(buf);
        }
 #else



Home | Main Index | Thread Index | Old Index