pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_install/files/create Use __UNCONST to rem...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/37721e4dce66
branches:  trunk
changeset: 342105:37721e4dce66
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Sun Oct 13 21:49:36 2019 +0000

description:
Use __UNCONST to remove const attributes before free.

diffstat:

 pkgtools/pkg_install/files/create/util.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (14 lines):

diff -r 70ca9d1b6411 -r 37721e4dce66 pkgtools/pkg_install/files/create/util.c
--- a/pkgtools/pkg_install/files/create/util.c  Sun Oct 13 21:48:57 2019 +0000
+++ b/pkgtools/pkg_install/files/create/util.c  Sun Oct 13 21:49:36 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