Source-Changes-HG archive

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

[src/trunk]: src/lib/libusb sprinkle in more _DIAGASSERT()



details:   https://anonhg.NetBSD.org/src/rev/6d96d8bbf41e
branches:  trunk
changeset: 501937:6d96d8bbf41e
user:      lukem <lukem%NetBSD.org@localhost>
date:      Tue Jan 09 14:29:22 2001 +0000

description:
sprinkle in more _DIAGASSERT()

diffstat:

 lib/libusb/usage.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r f22428b8e3f7 -r 6d96d8bbf41e lib/libusb/usage.c
--- a/lib/libusb/usage.c        Tue Jan 09 13:55:20 2001 +0000
+++ b/lib/libusb/usage.c        Tue Jan 09 14:29:22 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usage.c,v 1.9 2000/12/28 01:22:40 augustss Exp $       */
+/*     $NetBSD: usage.c,v 1.10 2001/01/09 14:29:22 lukem Exp $ */
 
 /*
  * Copyright (c) 1999 Lennart Augustsson <augustss%netbsd.org@localhost>
@@ -213,10 +213,13 @@
 int
 hid_parse_usage_in_page(const char *name)
 {
-       const char *sep = strchr(name, ':');
+       const char *sep;
        int k, j;
        unsigned int l;
 
+       _DIAGASSERT(name != NULL);
+
+       sep = strchr(name, ':');
        if (sep == NULL)
                return -1;
        l = sep - name;



Home | Main Index | Thread Index | Old Index