diff options
author | Volker Lendecke <vl@samba.org> | 2021-04-07 15:25:09 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2021-04-19 18:18:31 +0000 |
commit | 43dcca632a221f6469f0fc0c34c714b7765f1f3b (patch) | |
tree | 6eed437d8cfdecfa5146e8fe7104be016d77d058 /source3 | |
parent | 604c16453c7cee96e23cec52cbc061a15e78b703 (diff) | |
download | samba-43dcca632a221f6469f0fc0c34c714b7765f1f3b.tar.gz |
printing: Make winreg_get_printer() a bit easier to read
EMPTY_STRING does not gain clarity over "" for me.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_client/cli_winreg_spoolss.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/source3/rpc_client/cli_winreg_spoolss.c b/source3/rpc_client/cli_winreg_spoolss.c index 3b66e20676d..051b6665fde 100644 --- a/source3/rpc_client/cli_winreg_spoolss.c +++ b/source3/rpc_client/cli_winreg_spoolss.c @@ -38,8 +38,6 @@ #define TOP_LEVEL_CONTROL_KEY "SYSTEM\\CurrentControlSet\\Control\\Print" #define TOP_LEVEL_CONTROL_FORMS_KEY TOP_LEVEL_CONTROL_KEY "\\Forms" -#define EMPTY_STRING "" - #define FILL_STRING(mem_ctx, in, out) \ do { \ if (in && strlen(in)) { \ @@ -555,7 +553,7 @@ static WERROR winreg_enumval_to_sz(TALLOC_CTX *mem_ctx, } if (v->data_length == 0) { - *_str = talloc_strdup(mem_ctx, EMPTY_STRING); + *_str = talloc_strdup(mem_ctx, ""); if (*_str == NULL) { return WERR_NOT_ENOUGH_MEMORY; } @@ -1557,17 +1555,17 @@ WERROR winreg_get_printer(TALLOC_CTX *mem_ctx, goto done; } - FILL_STRING(info2, EMPTY_STRING, info2->servername); - FILL_STRING(info2, EMPTY_STRING, info2->printername); - FILL_STRING(info2, EMPTY_STRING, info2->sharename); - FILL_STRING(info2, EMPTY_STRING, info2->portname); - FILL_STRING(info2, EMPTY_STRING, info2->drivername); - FILL_STRING(info2, EMPTY_STRING, info2->comment); - FILL_STRING(info2, EMPTY_STRING, info2->location); - FILL_STRING(info2, EMPTY_STRING, info2->sepfile); - FILL_STRING(info2, EMPTY_STRING, info2->printprocessor); - FILL_STRING(info2, EMPTY_STRING, info2->datatype); - FILL_STRING(info2, EMPTY_STRING, info2->parameters); + FILL_STRING(info2, "", info2->servername); + FILL_STRING(info2, "", info2->printername); + FILL_STRING(info2, "", info2->sharename); + FILL_STRING(info2, "", info2->portname); + FILL_STRING(info2, "", info2->drivername); + FILL_STRING(info2, "", info2->comment); + FILL_STRING(info2, "", info2->location); + FILL_STRING(info2, "", info2->sepfile); + FILL_STRING(info2, "", info2->printprocessor); + FILL_STRING(info2, "", info2->datatype); + FILL_STRING(info2, "", info2->parameters); for (i = 0; i < num_values; i++) { enum_value.value_name = enum_names[i]; |