diff options
author | Xin LI <delphij@FreeBSD.org> | 2009-12-28 17:57:37 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2009-12-28 17:57:37 +0000 |
commit | 7f471a3289a6417466ab2647b6f2519d7955cf28 (patch) | |
tree | e054bfe4dd7cfa7b6798433044893d67c8052a11 /usr.sbin/rpc.umntall | |
parent | a411786576416749479a3078853a352997dbe96c (diff) | |
download | src-7f471a3289a6417466ab2647b6f2519d7955cf28.tar.gz src-7f471a3289a6417466ab2647b6f2519d7955cf28.zip |
Make umount(8) WARNS=6 clean:
- Cast delimiter width to integer [1]
- Solve name conflicts against system header
- Constify parameters to avoid qualifier conflict
PR: bin/140017 [1]
Submitted by: Ulrich Spörlein <uqs spoerlein net> [1]
MFC after: 1 month
Sponsored by: iXsystems, Inc
Notes
Notes:
svn path=/head/; revision=201135
Diffstat (limited to 'usr.sbin/rpc.umntall')
-rw-r--r-- | usr.sbin/rpc.umntall/mounttab.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/rpc.umntall/mounttab.c b/usr.sbin/rpc.umntall/mounttab.c index 9d7fe2f89edd..9765f4f7fe20 100644 --- a/usr.sbin/rpc.umntall/mounttab.c +++ b/usr.sbin/rpc.umntall/mounttab.c @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); struct mtablist *mtabhead; -static void badline(char *field, char *bad); +static void badline(const char *field, const char *bad); /* * Add an entry to PATH_MOUNTTAB for each mounted NFS filesystem, @@ -69,12 +69,12 @@ add_mtab(char *hostp, char *dirp) { * Read mounttab line for line and return struct mtablist. */ int -read_mtab() { +read_mtab(void) { struct mtablist **mtabpp, *mtabp; char *hostp, *dirp, *cp; char str[STRSIZ]; char *timep, *endp; - time_t time; + time_t actiontime; u_long ultmp; FILE *mtabfile; @@ -86,7 +86,7 @@ read_mtab() { return (0); } } - time = 0; + actiontime = 0; mtabpp = &mtabhead; while (fgets(str, STRSIZ, mtabfile) != NULL) { cp = str; @@ -113,13 +113,13 @@ read_mtab() { badline("time", timep); continue; } - time = ultmp; + actiontime = ultmp; if ((mtabp = malloc(sizeof (struct mtablist))) == NULL) { syslog(LOG_ERR, "malloc"); fclose(mtabfile); return (0); } - mtabp->mtab_time = time; + mtabp->mtab_time = actiontime; memmove(mtabp->mtab_host, hostp, MNTNAMLEN); mtabp->mtab_host[MNTNAMLEN - 1] = '\0'; memmove(mtabp->mtab_dirp, dirp, MNTPATHLEN); @@ -218,7 +218,7 @@ free_mtab() { * Print bad lines to syslog. */ static void -badline(char *field, char *bad) { +badline(const char *field, const char *bad) { syslog(LOG_ERR, "bad mounttab %s field '%s'", field, (bad == NULL) ? "<null>" : bad); } |