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