Const poision.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15959 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2005-08-23 10:50:12 +00:00
parent dd65561899
commit c6dc7f253e
2 changed files with 7 additions and 7 deletions

View File

@@ -41,7 +41,7 @@ FILE *headerfile, *codefile, *logfile;
static const char *orig_filename; static const char *orig_filename;
static char *header; static char *header;
static char *headerbase = STEM; static const char *headerbase = STEM;
/* /*
* list of all IMPORTs * list of all IMPORTs
@@ -77,9 +77,9 @@ init_generate (const char *filename, const char *base)
orig_filename = filename; orig_filename = filename;
if (base != NULL) { if (base != NULL) {
asprintf(&headerbase, "%s", base); headerbase = strdup(base);
if (headerbase == NULL) if (headerbase == NULL)
errx(1, "malloc"); errx(1, "strdup");
} }
asprintf(&header, "%s.h", headerbase); asprintf(&header, "%s.h", headerbase);
if (header == NULL) if (header == NULL)
@@ -349,7 +349,7 @@ space(int level)
fprintf(headerfile, " "); fprintf(headerfile, " ");
} }
static char * static const char *
last_member_p(struct member *m) last_member_p(struct member *m)
{ {
struct member *n = ASN1_TAILQ_NEXT(m, members); struct member *n = ASN1_TAILQ_NEXT(m, members);
@@ -521,7 +521,7 @@ define_asn1 (int level, Type *t)
} }
static void static void
define_type (int level, char *name, Type *t, int typedefp, int preservep) define_type (int level, const char *name, Type *t, int typedefp, int preservep)
{ {
switch (t->type) { switch (t->type) {
case TType: case TType:

View File

@@ -77,8 +77,8 @@ int
main(int argc, char **argv) main(int argc, char **argv)
{ {
int ret; int ret;
char *file; const char *file;
char *name = NULL; const char *name = NULL;
int optidx = 0; int optidx = 0;
setprogname(argv[0]); setprogname(argv[0]);