From 9d4cbe61c3649ff95f0b6aa6e3a9fcd5bc4968aa Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Wed, 27 Jan 2016 21:56:10 +0100 Subject: [PATCH] s3-utils/smbget: Fix reading the rcfile BUG: https://bugzilla.samba.org/show_bug.cgi?id=11700 shortName in POPT_AUTOHELP is null, so the loop always stopped at this item. Signed-off-by: Christian Ambach Reviewed-by: Andreas Schneider (cherry picked from commit bf1c1ad068a763108f9b8f79431de522783a4302) --- source3/utils/smbget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/utils/smbget.c b/source3/utils/smbget.c index 3ced8df9e3c..e332b2d99b4 100644 --- a/source3/utils/smbget.c +++ b/source3/utils/smbget.c @@ -707,7 +707,7 @@ static int readrcfile(const char *name, const struct poptOption long_options[]) found = false; - for (i = 0; long_options[i].shortName; i++) { + for (i = 0; long_options[i].argInfo; i++) { if (!long_options[i].longName) { continue; } -- 2.11.4.GIT