From c83cf5cba823ed06984c6e30f40eb6395c4ed970 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Fri, 12 Aug 2016 12:19:48 +1000 Subject: nfsclient: Only parse for options when present. --- rtemsbsd/nfsclient/nfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rtemsbsd/nfsclient/nfs.c b/rtemsbsd/nfsclient/nfs.c index b68bab31..53b0ff13 100644 --- a/rtemsbsd/nfsclient/nfs.c +++ b/rtemsbsd/nfsclient/nfs.c @@ -1809,7 +1809,10 @@ RpcUdpServer nfsServer = 0; int e = -1; char *path = mt_entry->dev; const char *options = (const char*) data; -bool verbose = strstr(options, "-v") != NULL; +bool verbose = false; + + if (options != NULL) + verbose = strstr(options, "-v") != NULL; if (rpcUdpInit (verbose) < 0) { fprintf (stderr, "error: initialising RPC\n"); -- cgit v1.2.3