summaryrefslogtreecommitdiffstats
path: root/usr.sbin/setfmac/setfmac.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2005-01-27 14:44:39 +0000
committerdelphij <delphij@FreeBSD.org>2005-01-27 14:44:39 +0000
commitfa89c5605faa7ae6d16c35fc946e46a24e9d1efe (patch)
tree800108ee5884bcedcb1f18818809981552758c56 /usr.sbin/setfmac/setfmac.c
parent1f1fe48dc9a77d0ec832c8d740c61402285c96a9 (diff)
downloadFreeBSD-src-fa89c5605faa7ae6d16c35fc946e46a24e9d1efe.zip
FreeBSD-src-fa89c5605faa7ae6d16c35fc946e46a24e9d1efe.tar.gz
WARNS?=6 cleanup for [gs]et[fp]mac:
- Constify structure members that should not be changed during process. - Apply static where needed - signed/unsigned madness - Bump WARNS?= levels from 2 to 6 (this is a diff reduction for a subsequent commit against these Makefile's)
Diffstat (limited to 'usr.sbin/setfmac/setfmac.c')
-rw-r--r--usr.sbin/setfmac/setfmac.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/setfmac/setfmac.c b/usr.sbin/setfmac/setfmac.c
index d5f5a61..f382cb2 100644
--- a/usr.sbin/setfmac/setfmac.c
+++ b/usr.sbin/setfmac/setfmac.c
@@ -54,7 +54,7 @@ struct label_spec {
regex_t regex; /* compiled regular expression to match */
char *regexstr; /* uncompiled regular expression */
mode_t mode; /* mode to possibly match */
- char *modestr; /* print-worthy ",-?" mode string */
+ const char *modestr; /* print-worthy ",-?" mode string */
char *mactext; /* MAC label to apply */
int flags; /* miscellaneous flags */
#define F_DONTLABEL 0x01
@@ -195,13 +195,13 @@ usage(int is_setfmac)
exit(1);
}
-int
+static int
chomp_line(char **line, size_t *linesize)
{
char *s;
int freeme = 0;
- for (s = *line; s - *line < *linesize; s++) {
+ for (s = *line; (unsigned)(s - *line) < *linesize; s++) {
if (!isspace(*s))
break;
}
OpenPOWER on IntegriCloud