summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2009-12-28 17:57:37 +0000
committerdelphij <delphij@FreeBSD.org>2009-12-28 17:57:37 +0000
commitd56b6698823dbac6ba15c4ad6f2c38b3e7ec5b1c (patch)
treee054bfe4dd7cfa7b6798433044893d67c8052a11 /usr.sbin
parent56603546c67f75a4f5ead37f6bdeb0c40db07c8e (diff)
downloadFreeBSD-src-d56b6698823dbac6ba15c4ad6f2c38b3e7ec5b1c.zip
FreeBSD-src-d56b6698823dbac6ba15c4ad6f2c38b3e7ec5b1c.tar.gz
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
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/rpc.umntall/mounttab.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/rpc.umntall/mounttab.c b/usr.sbin/rpc.umntall/mounttab.c
index 9d7fe2f..9765f4f 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);
}
OpenPOWER on IntegriCloud