[DTC PATCH] Remove const from dtc_file::dir.

flat view
DORMANTno replies

From: Scott Wood <hidden>
Date: 2008-01-11 19:15:34
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Scott Wood <redacted>
---
 srcpos.c |    4 ++--
 srcpos.h |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpos.c b/srcpos.c
index 7d0f0a7..c8eaa1e 100644
--- a/srcpos.c
+++ b/srcpos.c
@@ -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)
 	if (fclose(file->file))
 		die("Error closing \"%s\": %s\n", file->name, strerror(errno));
 
-	free((void *)file->dir);
+	free(file->dir);
 	free(file);
 }
diff --git a/srcpos.h b/srcpos.h
index 8108539..3ed2334 100644
--- a/srcpos.h
+++ b/srcpos.h
@@ -25,7 +25,7 @@
 #include <stdio.h>
 
 struct dtc_file {
-	const char *dir;
+	char *dir;
 	const char *name;
 	FILE *file;
 };
-- 
1.5.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help