s3-utils/smbget: Fix reading the rcfile
authorChristian Ambach <ambi@samba.org>
Wed, 27 Jan 2016 20:56:10 +0000 (21:56 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 28 Jan 2016 08:58:26 +0000 (09:58 +0100)
shortName in POPT_AUTOHELP is null, so the loop always stopped at this
item.

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/utils/smbget.c

index 3ced8df9e3c127791dd11343ef1cf8ccade674bb..e332b2d99b42ee74c736710f232759c68664e25e 100644 (file)
@@ -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;
                        }