diff options
| author | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-08-01 09:55:47 +0000 |
|---|---|---|
| committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-08-01 09:55:47 +0000 |
| commit | 2d1b974f3a71544c2aa9e4e648a3acad80ed7aaa (patch) | |
| tree | b6490e90293ee214eb54f001b25695f4e3833e8d /pw/pw_conf.c | |
| parent | 118a862383488360f366603cc32994fd65718474 (diff) | |
| download | pw-darwin-2d1b974f3a71544c2aa9e4e648a3acad80ed7aaa.tar.gz pw-darwin-2d1b974f3a71544c2aa9e4e648a3acad80ed7aaa.zip | |
Cast uid/git to uintmax_t when using printf-like functions so the size of
uid/gid size remains a implementation detail
Diffstat (limited to 'pw/pw_conf.c')
| -rw-r--r-- | pw/pw_conf.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pw/pw_conf.c b/pw/pw_conf.c index 33bb6b3..d351a8f 100644 --- a/pw/pw_conf.c +++ b/pw/pw_conf.c @@ -31,6 +31,7 @@ static const char rcsid[] = #include <sys/types.h> #include <sys/sbuf.h> +#include <inttypes.h> #include <string.h> #include <ctype.h> #include <fcntl.h> @@ -446,19 +447,19 @@ write_userconfig(char const * file) config.default_class : ""); break; case _UC_MINUID: - sbuf_printf(buf, "%u", config.min_uid); + sbuf_printf(buf, "%ju", (uintmax_t)config.min_uid); quote = 0; break; case _UC_MAXUID: - sbuf_printf(buf, "%u", config.max_uid); + sbuf_printf(buf, "%ju", (uintmax_t)config.max_uid); quote = 0; break; case _UC_MINGID: - sbuf_printf(buf, "%u", config.min_gid); + sbuf_printf(buf, "%ju", (uintmax_t)config.min_gid); quote = 0; break; case _UC_MAXGID: - sbuf_printf(buf, "%u", config.max_gid); + sbuf_printf(buf, "%ju", (uintmax_t)config.max_gid); quote = 0; break; case _UC_EXPIRE: |
