From aa220b5f62d62ea62dc8ac4e3a26696ee05faba7 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Thu, 27 Dec 2012 20:47:34 +0000 Subject: avoid arithmetic on uintptr_t Submitted by: pjd Reviewed by: jilles --- libutil/gr_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libutil') diff --git a/libutil/gr_util.c b/libutil/gr_util.c index f4a08c4..437fd78 100644 --- a/libutil/gr_util.c +++ b/libutil/gr_util.c @@ -452,7 +452,7 @@ gr_dup(const struct group *gr) return (NULL); /* point new gr_mem to end of struct + 1 */ if (gr->gr_mem != NULL) - newgr->gr_mem = (char **)((uintptr_t)newgr + sizeof(struct group)); + newgr->gr_mem = (char **)(newgr + 1); else newgr->gr_mem = NULL; /* point dst after the end of all the gr_mem pointers in newgr */ -- cgit v1.2.3-56-ge451