nfsclient: Only parse for options when present.

This commit is contained in:
Chris Johns
2016-08-12 12:19:48 +10:00
parent 691ed15cba
commit c83cf5cba8

View File

@@ -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");