summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net_share.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/source3/utils/net_share.c b/source3/utils/net_share.c
index db06b7d35a..156b27b572 100644
--- a/source3/utils/net_share.c
+++ b/source3/utils/net_share.c
@@ -62,12 +62,9 @@ int net_share_usage(struct net_context *c, int argc, const char **argv)
int net_share(struct net_context *c, int argc, const char **argv)
{
- if (argc < 1)
- return net_share_usage(c, argc, argv);
-
- if (StrCaseCmp(argv[0], "HELP") == 0) {
- net_share_usage(c, argc, argv);
- return 0;
+ if (argc > 0 && StrCaseCmp(argv[0], "HELP") == 0) {
+ net_share_usage(c, argc, argv);
+ return 0;
}
if (net_rpc_check(c, 0))