(svn r23198) -Codechange: introduce a free that takes const pointers so we don't need to cast to void/non-const before being able to free

This commit is contained in:
rubidium
2011-11-12 13:00:29 +00:00
parent d61b90ac6f
commit 7fd1e1df81
21 changed files with 78 additions and 60 deletions

View File

@@ -24,7 +24,7 @@ struct TarListEntry {
* to free filename, which isn't set at that moment... but because it
* initializes the variable with garbage, it's going to segfault. */
TarListEntry() : filename(NULL), dirname(NULL) {}
~TarListEntry() { free((void*)this->filename); free((void*)this->dirname); }
~TarListEntry() { free(this->filename); free(this->dirname); }
};
struct TarFileListEntry {