diff options
-rw-r--r-- | source3/client/umount.cifs.c | 7 | ||||
-rw-r--r-- | source3/lib/readline.c | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/source3/client/umount.cifs.c b/source3/client/umount.cifs.c index d1195755ca..ab94a20c60 100644 --- a/source3/client/umount.cifs.c +++ b/source3/client/umount.cifs.c @@ -341,6 +341,13 @@ int main(int argc, char ** argv) /* fixup path if needed */ + /* Trim any trailing slashes */ + while ((strlen(mountpoint) > 1) && + (mountpoint[strlen(mountpoint)-1] == '/')) + { + mountpoint[strlen(mountpoint)-1] = '\0'; + } + /* make sure that this is a cifs filesystem */ rc = statfs(mountpoint, &statbuf); diff --git a/source3/lib/readline.c b/source3/lib/readline.c index 6fed929be0..7c127817be 100644 --- a/source3/lib/readline.c +++ b/source3/lib/readline.c @@ -65,7 +65,7 @@ static char *smb_readline_replacement(const char *prompt, void (*callback)(void) } if (line == NULL) { - line = SMB_MALLOC(BUFSIZ); + line = (char *)SMB_MALLOC(BUFSIZ); if (!line) { return NULL; } |