svn commit: r205834 - head/usr.bin/calendar

Bruce Evans brde at optusnet.com.au
Tue Mar 30 03:29:12 UTC 2010


On Mon, 29 Mar 2010, Dag-Erling Smorgrav wrote:

> Log:
>  size_t is not equivalent to int on 64-bit platforms.

Neither is it on 16-63 or 65-infinity bit platforms, since it is not signed.

> Modified: head/usr.bin/calendar/parsedata.c
> ==============================================================================
> --- head/usr.bin/calendar/parsedata.c	Mon Mar 29 12:32:16 2010	(r205833)
> +++ head/usr.bin/calendar/parsedata.c	Mon Mar 29 13:20:52 2010	(r205834)
> @@ -39,9 +39,9 @@ __FBSDID("$FreeBSD$");
> static char *showflags(int flags);
> static int isonlydigits(char *s, int nostar);
> static const char *getmonthname(int i);
> -static int checkmonth(char *s, int *len, int *offset, const char **month);
> +static int checkmonth(char *s, size_t *len, size_t *offset, const char **month);
> static const char *getdayofweekname(int i);
> -static int checkdayofweek(char *s, int *len, int *offset, const char **dow);
> +static int checkdayofweek(char *s, size_t *len, size_t *offset, const char **dow);

len("size_t") is not equivalent to len("int") so s/size_t/int/g gives
ugly formatting on some platforms.

Bruce


More information about the svn-src-head mailing list