Browse Source

Remove const from dtc_file::dir.

Signed-off-by: Scott Wood <scottwood@freescale.com>
main
Scott Wood 17 years ago committed by Jon Loeliger
parent
commit
0f635df874
  1. 4
      srcpos.c
  2. 2
      srcpos.h

4
srcpos.c

@ -104,7 +104,7 @@ struct dtc_file *dtc_open_file(const char *fname, @@ -104,7 +104,7 @@ struct dtc_file *dtc_open_file(const char *fname,
}

out:
free((void *)file->dir);
free(file->dir);
free(file);
return NULL;
}
@ -114,6 +114,6 @@ void dtc_close_file(struct dtc_file *file) @@ -114,6 +114,6 @@ void dtc_close_file(struct dtc_file *file)
if (fclose(file->file))
die("Error closing \"%s\": %s\n", file->name, strerror(errno));

free((void *)file->dir);
free(file->dir);
free(file);
}

2
srcpos.h

@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
#include <stdio.h>

struct dtc_file {
const char *dir;
char *dir;
const char *name;
FILE *file;
};

Loading…
Cancel
Save