diff options
author | Andreas Schneider <asn@samba.org> | 2018-01-05 10:43:18 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2018-02-15 00:18:29 +0100 |
commit | 23ec3021224d797ab9d889d8152d8d7774da0226 (patch) | |
tree | f92766775f623a65b785311fbf70548611f20b4a /source3/client | |
parent | b415f9202fcb05eb75513494c596bf30082ca63d (diff) | |
download | samba-23ec3021224d797ab9d889d8152d8d7774da0226.tar.gz |
smbspool: Initialize empty_str on declaration
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/smbspool.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c index 3b732c99234..949cdb4076e 100644 --- a/source3/client/smbspool.c +++ b/source3/client/smbspool.c @@ -94,15 +94,13 @@ main(int argc, /* I - Number of command-line arguments */ FILE *fp; /* File to print */ int status = 1; /* Status of LPD job */ struct cli_state *cli; /* SMB interface */ - char null_str[1]; + char empty_str[] = ""; int tries = 0; bool need_auth = true; const char *dev_uri; const char *config_file = NULL; TALLOC_CTX *frame = talloc_stackframe(); - null_str[0] = '\0'; - if (argc == 1) { /* * NEW! In CUPS 1.1 the backends are run with no arguments @@ -190,16 +188,16 @@ main(int argc, /* I - Number of command-line arguments */ *tmp2++ = '\0'; password = uri_unescape_alloc(tmp2); } else { - password = null_str; + password = empty_str; } username = uri_unescape_alloc(tmp); } else { if ((username = getenv("AUTH_USERNAME")) == NULL) { - username = null_str; + username = empty_str; } if ((password = getenv("AUTH_PASSWORD")) == NULL) { - password = null_str; + password = empty_str; } server = uri + 6; |