From 2095eb0ecfa29054708dcb403fcf7eebc03d2f65 Mon Sep 17 00:00:00 2001 From: rread Date: Thu, 13 Nov 2003 19:22:32 +0000 Subject: [PATCH] - don't crash if there are no options --- lustre/utils/llmount.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/utils/llmount.c b/lustre/utils/llmount.c index 1f5475d..320ced4 100644 --- a/lustre/utils/llmount.c +++ b/lustre/utils/llmount.c @@ -74,7 +74,7 @@ parse_options(char * options, struct lustre_mount_data *lmd) int val; char *opt; char * opteq; - + /* parsing ideas here taken from util-linux/mount/nfsmount.c */ for (opt = strtok(options, ","); opt; opt = strtok(NULL, ",")) { if ((opteq = strchr(opt, '='))) { @@ -218,7 +218,7 @@ main(int argc, char * const argv[]) { char * source = argv[1]; char * target = argv[2]; - char * options = NULL; + char * options = ""; int opt; int i; struct lustre_mount_data lmd; -- 1.8.3.1