From 0097fa7d8712967d5024431d567a048c49d4944c Mon Sep 17 00:00:00 2001 From: Holger Hetterich Date: Wed, 3 Mar 2010 12:58:15 +0100 Subject: [PATCH] s3: net_share.c: fix argc handling The "net share" command was no longer possible because it enters the net_share function with argc == 0. --- source3/utils/net_share.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/source3/utils/net_share.c b/source3/utils/net_share.c index db06b7d..1b06067 100644 --- a/source3/utils/net_share.c +++ b/source3/utils/net_share.c @@ -62,10 +62,8 @@ 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) { + if (argc > 0 && StrCaseCmp(argv[0], "HELP") == 0) { net_share_usage(c, argc, argv); return 0; } -- 1.6.4.2