Noncontroversial changes?
Ken Pizzini
tz_ at explicate.org
Mon Nov 19 19:02:47 UTC 2007
On Mon, Nov 19, 2007 at 01:22:20PM -0500, Arthur David Olson wrote:
> Is there any controversy at all about these changes
Yes, this one is wrong:
> diff -ru tzcode2007h-less-P-macro/logwtmp.c tzcode2007-pre-i/logwtmp.c
> --- tzcode2007h-less-P-macro/logwtmp.c 2007-08-20 07:47:42.000000000 -0700
> +++ tzcode2007-pre-i/logwtmp.c 2007-11-13 15:08:32.934145830 -0800
> @@ -51,8 +51,8 @@
> struct utmp ut;
> struct stat buf;
> int fd;
> - time_t time();
> - char *strncpy();
> + time_t time(time_t *);
> + char *strncpy(char *, const char *);
>
> if ((fd = open(WTMPFILE, O_WRONLY|O_APPEND, 0)) < 0)
> return;
In particular, the strncpy() needs its third parameter (size_t),
but really the better fix is to delete these two lines and #include
the <time.h> and <string.h> headers instead.
--Ken Pizzini
More information about the tz
mailing list