summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJoseph Sutton <josephsutton@catalyst.net.nz>2023-05-01 15:36:53 +1200
committerJeremy Allison <jra@samba.org>2023-05-04 00:34:32 +0000
commit11f36804629f54bc812331eabb862bd0fd637dae (patch)
tree9000c010f5c52e09b99c2ff2de42256034e8f056 /source3
parentd2720a9e788f6870b7c68a1126820b15a8db811d (diff)
downloadsamba-11f36804629f54bc812331eabb862bd0fd637dae.tar.gz
s3:utils: Use ‘int’ for popt parameters
Previously we were handing the addresses of bool parameters to popt for POPT_ARG_NONE parameters. This is not supported, and popt was returning POPT_ERROR_BADOPERATION for these parameters (not bundled popt, though, nor on Debian or Ubuntu). Using integers instead ensures that these addresses are aligned and sized as popt expects. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/smbget.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/utils/smbget.c b/source3/utils/smbget.c
index 1753a5383fa..400d965b2a2 100644
--- a/source3/utils/smbget.c
+++ b/source3/utils/smbget.c
@@ -46,11 +46,11 @@ struct opt {
char *outputfile;
size_t blocksize;
- bool quiet;
- bool dots;
- bool verbose;
- bool send_stdout;
- bool update;
+ int quiet;
+ int dots;
+ int verbose;
+ int send_stdout;
+ int update;
unsigned limit_rate;
};
static struct opt opt = { .blocksize = SMB_DEFAULT_BLOCKSIZE };
@@ -720,7 +720,7 @@ int main(int argc, char **argv)
{
int c = 0;
const char *file = NULL;
- bool smb_encrypt = false;
+ int smb_encrypt = false;
int resume = 0, recursive = 0;
TALLOC_CTX *frame = talloc_stackframe();
bool ok = false;