Date: Mon, 31 Jan 2011 16:15:02 GMT From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 188380 for review Message-ID: <201101311615.p0VGF2Ze066741@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@188380?ac=10 Change 188380 by trasz@trasz_victim on 2011/01/31 16:14:22 Fix build on i386. Affected files ... .. //depot/projects/soc2009/trasz_limits/usr.bin/rctl/rctl.c#3 edit Differences ... ==== //depot/projects/soc2009/trasz_limits/usr.bin/rctl/rctl.c#3 (text+ko) ==== @@ -42,6 +42,7 @@ #include <grp.h> #include <libutil.h> #include <pwd.h> +#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -143,7 +144,7 @@ static char * expand_amount(char *rule) { - int64_t num; + uint64_t num; const char *subject, *subject_id, *resource, *action, *amount, *per; char *copy, *expanded; @@ -172,9 +173,9 @@ err(1, "expand_number"); if (per == NULL) - asprintf(&expanded, "%s:%s:%s:%s=%ld", subject, subject_id, resource, action, num); + asprintf(&expanded, "%s:%s:%s:%s=%ju", subject, subject_id, resource, action, (uintmax_t)num); else - asprintf(&expanded, "%s:%s:%s:%s=%ld/%s", subject, subject_id, resource, action, num, per); + asprintf(&expanded, "%s:%s:%s:%s=%ju/%s", subject, subject_id, resource, action, (uintmax_t)num, per); if (expanded == NULL) err(1, "asprintf");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101311615.p0VGF2Ze066741>