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/e6ba3e9b3b5f
branches:  trunk
changeset: 402652:e6ba3e9b3b5f
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 430e5145f574 -r e6ba3e9b3b5f 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