[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [leafnode-list] leafnode .16
I think this needs a bit more correcting.
In addition to changing to %ld, you should change n from type int to type
long (actually, type off_t), and cast st.st_size to long. Granted, for
most systems, it will be a noop, but it is more correct, since ANSI does
not provide for a way to print off_t.
Similar stuff should be done to the other section of code.
On Tue, Aug 29, 2000 at 08:00:34PM +0200, Cornelius Krasel wrote:
> --- activutil.c.orig Tue Aug 29 19:57:21 2000
> +++ activutil.c Tue Aug 29 19:38:33 2000
> @@ -257,8 +257,8 @@
> n = fread( buf, 1, st.st_size, f );
> if ( n < st.st_size ) {
> syslog( LOG_ERR,
> - "Groupinfo file truncated while reading: %d < %d .",
> - n, (int) st.st_size );
> + "Groupinfo file truncated while reading: %ld < %ld .",
> + n, st.st_size );
> }
> fclose( f );
> }
> @@ -413,7 +413,7 @@
> }
> closedir( ng );
> if ( debugmode )
> - syslog( LOG_DEBUG, "parsed directory %s: first %d, last %d",
> + syslog( LOG_DEBUG, "parsed directory %s: first %lu, last %lu",
> de->d_name, first, last );
> insertgroup( de->d_name, first, last, 0 );
> }
mrc
--
Mike Castle Life is like a clock: You can work constantly
dalgoda@xxxxxxxxxxxxx and be right all the time, or not work at all
www.netcom.com/~dalgoda/ and be right at least twice a day. -- mrc
We are all of us living in the shadow of Manhattan. -- Watchmen
--
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list