mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
smbspool: Initialize empty_str on declaration
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
b415f9202f
commit
23ec302122
@ -94,15 +94,13 @@ main(int argc, /* I - Number of command-line arguments */
|
|||||||
FILE *fp; /* File to print */
|
FILE *fp; /* File to print */
|
||||||
int status = 1; /* Status of LPD job */
|
int status = 1; /* Status of LPD job */
|
||||||
struct cli_state *cli; /* SMB interface */
|
struct cli_state *cli; /* SMB interface */
|
||||||
char null_str[1];
|
char empty_str[] = "";
|
||||||
int tries = 0;
|
int tries = 0;
|
||||||
bool need_auth = true;
|
bool need_auth = true;
|
||||||
const char *dev_uri;
|
const char *dev_uri;
|
||||||
const char *config_file = NULL;
|
const char *config_file = NULL;
|
||||||
TALLOC_CTX *frame = talloc_stackframe();
|
TALLOC_CTX *frame = talloc_stackframe();
|
||||||
|
|
||||||
null_str[0] = '\0';
|
|
||||||
|
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
/*
|
/*
|
||||||
* NEW! In CUPS 1.1 the backends are run with no arguments
|
* 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';
|
*tmp2++ = '\0';
|
||||||
password = uri_unescape_alloc(tmp2);
|
password = uri_unescape_alloc(tmp2);
|
||||||
} else {
|
} else {
|
||||||
password = null_str;
|
password = empty_str;
|
||||||
}
|
}
|
||||||
username = uri_unescape_alloc(tmp);
|
username = uri_unescape_alloc(tmp);
|
||||||
} else {
|
} else {
|
||||||
if ((username = getenv("AUTH_USERNAME")) == NULL) {
|
if ((username = getenv("AUTH_USERNAME")) == NULL) {
|
||||||
username = null_str;
|
username = empty_str;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((password = getenv("AUTH_PASSWORD")) == NULL) {
|
if ((password = getenv("AUTH_PASSWORD")) == NULL) {
|
||||||
password = null_str;
|
password = empty_str;
|
||||||
}
|
}
|
||||||
|
|
||||||
server = uri + 6;
|
server = uri + 6;
|
||||||
|
Loading…
Reference in New Issue
Block a user