Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/pkg_install/dist/create Use __UNCONST() rather ...
details: https://anonhg.NetBSD.org/src/rev/977f2e512a64
branches: trunk
changeset: 998054:977f2e512a64
user: kre <kre%NetBSD.org@localhost>
date: Sat Apr 06 08:29:01 2019 +0000
description:
Use __UNCONST() rather than a simple cast to free a const char *
while avoiding gcc noise.
diffstat:
external/bsd/pkg_install/dist/create/util.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (14 lines):
diff -r dde6490eb40a -r 977f2e512a64 external/bsd/pkg_install/dist/create/util.c
--- a/external/bsd/pkg_install/dist/create/util.c Sat Apr 06 07:57:04 2019 +0000
+++ b/external/bsd/pkg_install/dist/create/util.c Sat Apr 06 08:29:01 2019 +0000
@@ -147,8 +147,8 @@
free_memory_file(struct memory_file *file)
{
if (file != NULL) {
- free((char *)file->owner);
- free((char *)file->group);
+ free(__UNCONST(file->owner));
+ free(__UNCONST(file->group));
free(file->data);
free(file);
}
Home |
Main Index |
Thread Index |
Old Index