summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-02-21 04:25:04 +0000
committerTim Potter <tpot@samba.org>2003-02-21 04:25:04 +0000
commit4834c61ebcc16397b496a8b37d5078021041b1c1 (patch)
tree4fb270dc843dfb46924fd3f9718e7a583c74b518 /source3/rpcclient
parent1fc2976e14f8b79c85514d7947744bc495513670 (diff)
downloadsamba-4834c61ebcc16397b496a8b37d5078021041b1c1.tar.gz
samba-4834c61ebcc16397b496a8b37d5078021041b1c1.tar.bz2
samba-4834c61ebcc16397b496a8b37d5078021041b1c1.zip
Fix for only specifying one command with -c
(This used to be commit 7418351427071edccb2e825ddbbf31fce8ef381e)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/rpcclient.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index 37ce597d4e..7a9c464cf6 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -170,7 +170,10 @@ static char* next_command (char** cmdstr)
if (p)
*p = '\0';
pstrcpy(command, *cmdstr);
- *cmdstr = p + 1;
+ if (p)
+ *cmdstr = p + 1;
+ else
+ *cmdstr = NULL;
return command;
}