diff options
author | Chris Johns <chrisj@rtems.org> | 2016-08-12 12:19:48 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2016-08-12 15:56:30 +1000 |
commit | c83cf5cba823ed06984c6e30f40eb6395c4ed970 (patch) | |
tree | 5a3e525a3405265548b12ffdd3cb6155340d4f91 | |
parent | rtems-bsd-mutex: Use _Thread_queue_Surrender() (diff) | |
download | rtems-libbsd-c83cf5cba823ed06984c6e30f40eb6395c4ed970.tar.bz2 |
nfsclient: Only parse for options when present.
-rw-r--r-- | rtemsbsd/nfsclient/nfs.c | 5 |
1 files changed, 4 insertions, 1 deletions
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"); |