summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-03-04 01:33:06 +0100
committerGünther Deschner <gd@samba.org>2010-03-04 10:10:02 +0100
commit55946ddd1db070cc94f8208aaf8f0f10eeef30b6 (patch)
tree64ff93c190cb0135bf5220ba9fc945e364148ea4
parent74ba0b71891ce180079cc801e9fe11b4ea268e84 (diff)
downloadsamba-55946ddd1db070cc94f8208aaf8f0f10eeef30b6.tar.gz
samba-55946ddd1db070cc94f8208aaf8f0f10eeef30b6.tar.bz2
samba-55946ddd1db070cc94f8208aaf8f0f10eeef30b6.zip
testprogs: use dump_data in dump_printer_data.
Guenther
-rw-r--r--testprogs/win32/spoolss/printlib.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/testprogs/win32/spoolss/printlib.c b/testprogs/win32/spoolss/printlib.c
index e0fb6e7a1e..829ac40d67 100644
--- a/testprogs/win32/spoolss/printlib.c
+++ b/testprogs/win32/spoolss/printlib.c
@@ -1224,16 +1224,13 @@ static void dump_printer_data(DWORD size, LPBYTE buffer, DWORD type)
switch (type) {
case REG_SZ:
- printf("\t\t");
- for (i=0; i < size; i++) {
- printf("%c", buffer[i]);
- }
- printf("\n");
+ dump_data(buffer, size);
break;
case REG_MULTI_SZ:
+ dump_data(buffer, size);
p = (LPSTR)buffer;
while (p && *p) {
- printf("%s\n", p);
+ printf("\t\t%s\n", p);
for (; *p; p = CharNext(p)) {
p = CharNext(p);
}
@@ -1244,12 +1241,7 @@ static void dump_printer_data(DWORD size, LPBYTE buffer, DWORD type)
printf("\t\t0x%08x\n", (DWORD)*buffer);
break;
case REG_BINARY:
- for (i=0; i < size; i++) {
- printf("\t0x%x", buffer[i]);
- if (i%4 == 3) {
- printf("\n");
- }
- }
+ dump_data(buffer, size);
break;
default:
break;