summaryrefslogtreecommitdiff
path: root/source3/printing/nt_printing.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-07-20 13:23:57 +0000
committerGerald Carter <jerry@samba.org>2002-07-20 13:23:57 +0000
commit6dd9f24d05e5db92e15dc53399a0f78ccb69f718 (patch)
tree234454eee6950cf09745f658eebad80756ef6590 /source3/printing/nt_printing.c
parent29075c97d3b7111e2565ede1cd0f000fd2534375 (diff)
downloadsamba-6dd9f24d05e5db92e15dc53399a0f78ccb69f718.tar.gz
samba-6dd9f24d05e5db92e15dc53399a0f78ccb69f718.tar.bz2
samba-6dd9f24d05e5db92e15dc53399a0f78ccb69f718.zip
another intermediate checkin on the way to enumerating forms
via the registry. There is a seg fault here which shouldn't bother anyone until I can get it fixed. I just need a check point in case I need to roll back to this version later on. (This used to be commit e62ae94823461e142978a786b2860ea97906cfb3)
Diffstat (limited to 'source3/printing/nt_printing.c')
-rw-r--r--source3/printing/nt_printing.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index ff08b99eb0..76325c2990 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -435,25 +435,29 @@ int get_ntforms(nt_forms_struct **list)
for (kbuf = tdb_firstkey(tdb_forms);
kbuf.dptr;
- newkey = tdb_nextkey(tdb_forms, kbuf), safe_free(kbuf.dptr), kbuf=newkey) {
- if (strncmp(kbuf.dptr, FORMS_PREFIX, strlen(FORMS_PREFIX)) != 0) continue;
+ newkey = tdb_nextkey(tdb_forms, kbuf), safe_free(kbuf.dptr), kbuf=newkey)
+ {
+ if (strncmp(kbuf.dptr, FORMS_PREFIX, strlen(FORMS_PREFIX)) != 0)
+ continue;
dbuf = tdb_fetch(tdb_forms, kbuf);
- if (!dbuf.dptr) continue;
+ if (!dbuf.dptr)
+ continue;
fstrcpy(form.name, kbuf.dptr+strlen(FORMS_PREFIX));
ret = tdb_unpack(dbuf.dptr, dbuf.dsize, "dddddddd",
&i, &form.flag, &form.width, &form.length, &form.left,
&form.top, &form.right, &form.bottom);
SAFE_FREE(dbuf.dptr);
- if (ret != dbuf.dsize) continue;
+ if (ret != dbuf.dsize)
+ continue;
tl = Realloc(*list, sizeof(nt_forms_struct)*(n+1));
if (!tl) {
DEBUG(0,("get_ntforms: Realloc fail.\n"));
return 0;
}
- *list = tl;
+ *list = tl;
(*list)[n] = form;
n++;
}