avoid arithmetic on uintptr_t
Submitted by: pjd Reviewed by: jilles
This commit is contained in:
parent
7d90019877
commit
5019747579
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=244747
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user