libs/libc/grp/lib_grp.c: Fix a warning when compiling on a 64-bit simulation. Cannot cast a pointer to unsigned in that case because unsigned (int) is only 32-bits, but the pointer is 64-bits.

This commit is contained in:
Gregory Nutt 2019-08-03 08:41:55 -06:00
parent 1af4c94391
commit 2fcff93d20
1 changed files with 1 additions and 1 deletions

View File

@ -161,7 +161,7 @@ int getgrbuf_r(gid_t gid, FAR const char *name, FAR const char *passwd,
* sufficient buffer space was supplied by the caller.
*/
padlen = sizeof(FAR void *) - ((unsigned)buf % sizeof(FAR char *));
padlen = sizeof(FAR void *) - ((uintptr_t)buf % sizeof(FAR char *));
reqdlen = sizeof(FAR void *) + strlen(name) + 1 + strlen(passwd) + 1;
if (buflen < padlen + reqdlen)