diff options
author | Andrew Bartlett <abartlet@samba.org> | 2007-08-22 06:46:34 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:02:25 -0500 |
commit | b39330c4873d4c3923a577e89690fc0e43b0c61a (patch) | |
tree | 882a09a9e2ef446d3662ac542d1bf60fb8e7dfb2 /source4/heimdal/lib/asn1/gen_length.c | |
parent | db24e606f10902de49891e32600403274ece16da (diff) | |
download | samba-b39330c4873d4c3923a577e89690fc0e43b0c61a.tar.gz samba-b39330c4873d4c3923a577e89690fc0e43b0c61a.tar.bz2 samba-b39330c4873d4c3923a577e89690fc0e43b0c61a.zip |
r24614: Merge with current lorikeet-heimdal. This brings us one step closer
to an alpha release.
Andrew Bartlett
(This used to be commit 30e02747d511630659c59eafec8d28f58605943b)
Diffstat (limited to 'source4/heimdal/lib/asn1/gen_length.c')
-rw-r--r-- | source4/heimdal/lib/asn1/gen_length.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source4/heimdal/lib/asn1/gen_length.c b/source4/heimdal/lib/asn1/gen_length.c index a1f7cc6644..4cb5d45089 100644 --- a/source4/heimdal/lib/asn1/gen_length.c +++ b/source4/heimdal/lib/asn1/gen_length.c @@ -33,7 +33,7 @@ #include "gen_locl.h" -RCSID("$Id: gen_length.c 19539 2006-12-28 17:15:05Z lha $"); +RCSID("$Id: gen_length.c 21503 2007-07-12 11:57:19Z lha $"); static void length_primitive (const char *typename, @@ -72,12 +72,11 @@ length_type (const char *name, const Type *t, break; case TInteger: if(t->members) { - char *s; - asprintf(&s, "(const int*)%s", name); - if(s == NULL) - errx (1, "out of memory"); - length_primitive ("integer", s, variable); - free(s); + fprintf(codefile, + "{\n" + "int enumint = *%s;\n", name); + length_primitive ("integer", "&enumint", variable); + fprintf(codefile, "}\n"); } else if (t->range == NULL) { length_primitive ("heim_integer", name, variable); } else if (t->range->min == INT_MIN && t->range->max == INT_MAX) { |