|
|
49b67f |
autofs-5.1.7 - remove redundant local var from sun_mount()
|
|
|
49b67f |
|
|
|
49b67f |
From: Ian Kent <raven@themaw.net>
|
|
|
49b67f |
|
|
|
49b67f |
The local variable mountpoint in sun_mount() is set directly from a
|
|
|
49b67f |
passed in parameter and never changed and the source isn't changed
|
|
|
49b67f |
either, so use the variable directly.
|
|
|
49b67f |
|
|
|
49b67f |
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
|
49b67f |
---
|
|
|
49b67f |
CHANGELOG | 1 +
|
|
|
49b67f |
modules/parse_sun.c | 13 ++++---------
|
|
|
49b67f |
2 files changed, 5 insertions(+), 9 deletions(-)
|
|
|
49b67f |
|
|
|
49b67f |
--- autofs-5.1.4.orig/CHANGELOG
|
|
|
49b67f |
+++ autofs-5.1.4/CHANGELOG
|
|
|
49b67f |
@@ -42,6 +42,7 @@
|
|
|
49b67f |
- add mount and umount offsets functions.
|
|
|
49b67f |
- switch to use tree implementation for offsets.
|
|
|
49b67f |
- remove obsolete functions.
|
|
|
49b67f |
+- remove redundant local var from sun_mount().
|
|
|
49b67f |
|
|
|
49b67f |
xx/xx/2018 autofs-5.1.5
|
|
|
49b67f |
- fix flag file permission.
|
|
|
49b67f |
--- autofs-5.1.4.orig/modules/parse_sun.c
|
|
|
49b67f |
+++ autofs-5.1.4/modules/parse_sun.c
|
|
|
49b67f |
@@ -530,7 +530,6 @@ static int sun_mount(struct autofs_point
|
|
|
49b67f |
int nonstrict = 1;
|
|
|
49b67f |
int use_weight_only = ap->flags & MOUNT_FLAG_USE_WEIGHT_ONLY;
|
|
|
49b67f |
int rv, cur_state;
|
|
|
49b67f |
- char *mountpoint;
|
|
|
49b67f |
char *what;
|
|
|
49b67f |
char *type;
|
|
|
49b67f |
|
|
|
49b67f |
@@ -623,9 +622,6 @@ static int sun_mount(struct autofs_point
|
|
|
49b67f |
}
|
|
|
49b67f |
}
|
|
|
49b67f |
|
|
|
49b67f |
- mountpoint = alloca(namelen + 1);
|
|
|
49b67f |
- sprintf(mountpoint, "%.*s", namelen, name);
|
|
|
49b67f |
-
|
|
|
49b67f |
type = ap->entry->maps->type;
|
|
|
49b67f |
if (type && !strcmp(type, "hosts")) {
|
|
|
49b67f |
if (options && *options != '\0') {
|
|
|
49b67f |
@@ -700,9 +696,9 @@ static int sun_mount(struct autofs_point
|
|
|
49b67f |
debug(ap->logopt, MODPREFIX
|
|
|
49b67f |
"mounting root %s, mountpoint %s, "
|
|
|
49b67f |
"what %s, fstype %s, options %s",
|
|
|
49b67f |
- root, mountpoint, what, fstype, options);
|
|
|
49b67f |
+ root, name, what, fstype, options);
|
|
|
49b67f |
|
|
|
49b67f |
- rv = mount_nfs->mount_mount(ap, root, mountpoint, strlen(mountpoint),
|
|
|
49b67f |
+ rv = mount_nfs->mount_mount(ap, root, name, namelen,
|
|
|
49b67f |
what, fstype, options, mount_nfs->context);
|
|
|
49b67f |
} else {
|
|
|
49b67f |
if (!loclen)
|
|
|
49b67f |
@@ -722,11 +718,10 @@ static int sun_mount(struct autofs_point
|
|
|
49b67f |
debug(ap->logopt, MODPREFIX
|
|
|
49b67f |
"mounting root %s, mountpoint %s, "
|
|
|
49b67f |
"what %s, fstype %s, options %s",
|
|
|
49b67f |
- root, mountpoint, what, fstype, options);
|
|
|
49b67f |
+ root, name, what, fstype, options);
|
|
|
49b67f |
|
|
|
49b67f |
/* Generic mount routine */
|
|
|
49b67f |
- rv = do_mount(ap, root, mountpoint, strlen(mountpoint), what, fstype,
|
|
|
49b67f |
- options);
|
|
|
49b67f |
+ rv = do_mount(ap, root, name, namelen, what, fstype, options);
|
|
|
49b67f |
}
|
|
|
49b67f |
pthread_setcancelstate(cur_state, NULL);
|
|
|
49b67f |
|