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