summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-02-21 16:03:58 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:58 -0500
commit4b476ff4fbbba72d9497f6544c1f1fca9ff3a0ae (patch)
treec0063b234fdd1d557d7aafc68e364e484e8baf56 /source4/lib
parent08195b0ed5ffdd2373fedcae7b4872284719de6c (diff)
downloadsamba-4b476ff4fbbba72d9497f6544c1f1fca9ff3a0ae.tar.gz
samba-4b476ff4fbbba72d9497f6544c1f1fca9ff3a0ae.tar.bz2
samba-4b476ff4fbbba72d9497f6544c1f1fca9ff3a0ae.zip
r13592: Incredible how bugs like this can sweep in even after peer review and testing ...
(This used to be commit 8483f61a1df0c80f3385b1ab5a2628c2a97d41a2)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/replace/snprintf.c41
1 files changed, 22 insertions, 19 deletions
diff --git a/source4/lib/replace/snprintf.c b/source4/lib/replace/snprintf.c
index f3eac1b9b5..41f1084fd6 100644
--- a/source4/lib/replace/snprintf.c
+++ b/source4/lib/replace/snprintf.c
@@ -1112,25 +1112,28 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c)
}
static struct pr_chunk *new_chunk(void) {
- struct pr_chunk *new = (struct pr_chunk *)malloc(sizeof(struct pr_chunk));
-
- if (!new) return NULL;
-
- new->type = 0;
- new->num = 0;
- new->min = 0;
- new->min_star = NULL;
- new->max = -1;
- new->max_star = NULL;
- new->flags = 0;
- new->cflags = 0;
- new->start = 0;
- new->len = 0;
- new->value = 0;
- new->fvalue = 0;
- new->strvalue = NULL;
- new->pnum = NULL;
- new->next = NULL;
+ struct pr_chunk *new_c = (struct pr_chunk *)malloc(sizeof(struct pr_chunk));
+
+ if (!new_c)
+ return NULL;
+
+ new_c->type = 0;
+ new_c->num = 0;
+ new_c->min = 0;
+ new_c->min_star = NULL;
+ new_c->max = -1;
+ new_c->max_star = NULL;
+ new_c->flags = 0;
+ new_c->cflags = 0;
+ new_c->start = 0;
+ new_c->len = 0;
+ new_c->value = 0;
+ new_c->fvalue = 0;
+ new_c->strvalue = NULL;
+ new_c->pnum = NULL;
+ new_c->next = NULL;
+
+ return new_c;
}
static int add_cnk_list_entry(struct pr_chunk_x **list,