diff options
author | Volker Lendecke <vl@samba.org> | 2021-05-12 18:22:52 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2021-06-04 16:47:34 +0000 |
commit | 93a28a5f2456bbcdd3104c251a019f1f4f354219 (patch) | |
tree | bf55393cfce63297b0f7b125cce4261125b09456 /source3/printing/printing.c | |
parent | 4388ad2a900a931770756e8c3cb2e61216722c92 (diff) | |
download | samba-93a28a5f2456bbcdd3104c251a019f1f4f354219.tar.gz |
printing: Simplify pack_devicemode()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/printing/printing.c')
-rw-r--r-- | source3/printing/printing.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source3/printing/printing.c b/source3/printing/printing.c index 982eb4f9cdd..415f86e6745 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -168,7 +168,7 @@ static TDB_DATA print_key(uint32_t jobid, uint32_t *tmp) static int pack_devicemode(struct spoolss_DeviceMode *devmode, uint8_t *buf, int buflen) { enum ndr_err_code ndr_err; - DATA_BLOB blob; + DATA_BLOB blob = { .data = NULL }; int len = 0; if (devmode) { @@ -181,8 +181,6 @@ static int pack_devicemode(struct spoolss_DeviceMode *devmode, uint8_t *buf, int "error encoding spoolss_DeviceMode\n")); goto done; } - } else { - ZERO_STRUCT(blob); } len = tdb_pack(buf, buflen, "B", blob.length, blob.data); |