summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorHolger Hetterich <hhetter@novell.com>2010-03-02 23:17:20 +0100
committerJeremy Allison <jra@samba.org>2010-03-02 15:27:58 -0800
commite3c2e1a30375c393f0ee0d50e814e7c7482c5182 (patch)
tree95d0af196540e6061b769047c7c0ec994ea698ce /source3/utils
parentf36dafd852b1ed608e0c988c3c5f8823e909a4d6 (diff)
downloadsamba-e3c2e1a30375c393f0ee0d50e814e7c7482c5182.tar.gz
samba-e3c2e1a30375c393f0ee0d50e814e7c7482c5182.tar.bz2
samba-e3c2e1a30375c393f0ee0d50e814e7c7482c5182.zip
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.
Diffstat (limited to 'source3/utils')
-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))