Changeset 8ff186f in rtems-libbsd


Ignore:
Timestamp:
Oct 18, 2013, 2:47:43 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, c1e05b9ea378b2971e3d7704779112b4bc4296da, freebsd-9.3, 4a77611a223ea883fb548679b516d326a020d447
Children:
60618d5
Parents:
13b50b3
git-author:
Sebastian Huber <sebastian.huber@…> (10/18/13 14:47:43)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/31/13 12:18:49)
Message:

IFCONFIG(8): Fix isdigit() and isprint() usage

Location:
freebsd/sbin/ifconfig
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • freebsd/sbin/ifconfig/af_inet.c

    r13b50b3 r8ff186f  
    117117                        struct sockaddr_in *min = sintab[MASK];
    118118                        *p = '\0';
    119                         if (!isdigit(*(p + 1)))
     119                        if (!isdigit((unsigned char)*(p + 1)))
    120120                                errstr = "invalid";
    121121                        else
  • freebsd/sbin/ifconfig/ifbridge.c

    r13b50b3 r8ff186f  
    156156        /* replace the prefix with whitespace */
    157157        for (p = pad; *p != '\0'; p++) {
    158                 if(isprint(*p))
     158                if(isprint((unsigned char)*p))
    159159                        *p = ' ';
    160160        }
  • freebsd/sbin/ifconfig/ifgroup.c

    r13b50b3 r8ff186f  
    5353        strlcpy(ifgr.ifgr_name, name, IFNAMSIZ);
    5454
    55         if (group_name[0] && isdigit(group_name[strlen(group_name) - 1]))
     55        if (group_name[0] && isdigit((unsigned char)group_name[strlen(group_name) - 1]))
    5656                errx(1, "setifgroup: group names may not end in a digit");
    5757
     
    7171        strlcpy(ifgr.ifgr_name, name, IFNAMSIZ);
    7272
    73         if (group_name[0] && isdigit(group_name[strlen(group_name) - 1]))
     73        if (group_name[0] && isdigit((unsigned char)group_name[strlen(group_name) - 1]))
    7474                errx(1, "unsetifgroup: group names may not end in a digit");
    7575
Note: See TracChangeset for help on using the changeset viewer.