Author: bapt
Date: Thu Dec 27 20:47:34 2012
New Revision: 244747
URL: http://svnweb.freebsd.org/changeset/base/244747

Log:
  avoid arithmetic on uintptr_t
  
  Submitted by: pjd
  Reviewed by:  jilles

Modified:
  head/lib/libutil/gr_util.c

Modified: head/lib/libutil/gr_util.c
==============================================================================
--- head/lib/libutil/gr_util.c  Thu Dec 27 20:46:17 2012        (r244746)
+++ head/lib/libutil/gr_util.c  Thu Dec 27 20:47:34 2012        (r244747)
@@ -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 */
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to