NetBSD-Bugs archive

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

bin/44642: Word bool used as variable.



>Number:         44642
>Category:       bin
>Synopsis:       Word bool used as variable.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 26 12:20:01 +0000 2011
>Originator:     Henning Petersen
>Release:        NetBSD-current
>Organization:
>Environment:
>Description:
Word bool used as variable, rename bool to bool_int.
>How-To-Repeat:

>Fix:
diff -u -r1.17 showmount.c
--- usr.bin/showmount/showmount.c       13 Apr 2009 07:30:49 -0000      1.17
+++ usr.bin/showmount/showmount.c       24 Feb 2011 15:33:02 -0000
@@ -241,14 +241,14 @@
 xdr_mntdump(XDR *xdrsp, struct mountlist **mlp)
 {
        struct mountlist *mp, **otp, *tp;
-       int bool, val, val2;
+       int bool_int, val, val2;
        char *strp;
 
        otp = NULL;
        *mlp = (struct mountlist *)0;
-       if (!xdr_bool(xdrsp, &bool))
+       if (!xdr_bool(xdrsp, &bool_int))
                return (0);
-       while (bool) {
+       while (bool_int) {
                mp = (struct mountlist *)malloc(sizeof(struct mountlist));
                if (mp == NULL)
                        return (0);
@@ -306,7 +306,7 @@
                        *otp = mp;
                }
 next:
-               if (!xdr_bool(xdrsp, &bool))
+               if (!xdr_bool(xdrsp, &bool_int))
                        return (0);
        }
        return (1);
@@ -320,13 +320,13 @@
 {
        struct exportslist *ep;
        struct grouplist *gp;
-       int bool, grpbool;
+       int bool_int, grpbool;
        char *strp;
 
        *exp = (struct exportslist *)0;
-       if (!xdr_bool(xdrsp, &bool))
+       if (!xdr_bool(xdrsp, &bool_int))
                return (0);
-       while (bool) {
+       while (bool_int) {
                ep = (struct exportslist *)malloc(sizeof(struct exportslist));
                if (ep == NULL)
                        return (0);
@@ -350,7 +350,7 @@
                }
                ep->ex_next = *exp;
                *exp = ep;
-               if (!xdr_bool(xdrsp, &bool))
+               if (!xdr_bool(xdrsp, &bool_int))
                        return (0);
        }
        return (1);



Home | Main Index | Thread Index | Old Index