From c5fb6551d92f50ee7b29d330b4458e8a4224be20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Deschner?= Date: Fri, 5 Mar 2010 00:56:52 +0100 Subject: [PATCH] s4-smbtorture: add more paranoid checks for REG_DWORD SetPrinterDataEx tests. Guenther --- source4/torture/rpc/spoolss.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index e03ebc588c5..2e3e374ed76 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -3290,7 +3290,6 @@ static bool test_SetPrinterDataEx_matrix(struct torture_context *tctx, REG_DWORD, REG_BINARY }; - uint32_t value = 12345678; const char *str = "abcdefghijklmnopqrstuvwxzy"; int i, t, s; @@ -3309,20 +3308,12 @@ static bool test_SetPrinterDataEx_matrix(struct torture_context *tctx, uint8_t *data_out; uint32_t needed, offered = 0; - if (types[t] == REG_DWORD) { - s = 0xffff; - } - switch (types[t]) { case REG_BINARY: + case REG_DWORD: data = blob; offered = blob.length; break; - case REG_DWORD: - data = data_blob(NULL, 4); - SIVAL(data.data, 0, value); - offered = 4; - break; case REG_SZ: torture_assert(tctx, reg_string_to_val(tctx, lp_iconv_convenience(tctx->lp_ctx),