On Mon, Jun 27, 2005 at 10:56:41AM -0600, Andrew Shewmaker wrote:
> + strlcat(fmt, "02x", sizeof fmt);
The purpose of the fmt buffer is to allow the user to specify something
like %-20s and get the output formatted into their log line, so you
shouldn't be using the fm
On 6/27/05, Wayne Davison <[EMAIL PROTECTED]> wrote:
> On Mon, Jun 27, 2005 at 09:22:25AM -0700, Wayne Davison wrote:
> > so you need to be sure to check for this and print some other
> > value ("N/A") for entries with a NULL pointer.
>
> Actually, the proper fix is to check the mode using S_ISREG
On 6/27/05, Paul Slootman <[EMAIL PROTECTED]> wrote:
> On Mon 27 Jun 2005, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote:
> > In article <[EMAIL PROTECTED]> (at Mon, 27 Jun 2005 00:07:19 -0600), Andrew
> > Shewmaker <[EMAIL PROTECTED]> says:
> >
> > > + for (j = 0; j < SUM_LENGTH; j+
On Mon, Jun 27, 2005 at 09:22:25AM -0700, Wayne Davison wrote:
> so you need to be sure to check for this and print some other
> value ("N/A") for entries with a NULL pointer.
Actually, the proper fix is to check the mode using S_ISREG() and only
ever dereference "u.sum" for a regular file (since
On Mon, Jun 27, 2005 at 12:07:19AM -0600, Andrew Shewmaker wrote:
> + for (j = 0; j < SUM_LENGTH; j++ ) {
> + snprintf(buf2 + j * 2, sizeof buf2, fmt,
> file->u.sum[j]);
Not every entry will have a non-zero "sum" pointer (e.g. symlinks, dirs,
et
On Mon 27 Jun 2005, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote:
> In article <[EMAIL PROTECTED]> (at Mon, 27 Jun 2005 00:07:19 -0600), Andrew
> Shewmaker <[EMAIL PROTECTED]> says:
>
> > + for (j = 0; j < SUM_LENGTH; j++ ) {
> > + snprintf(buf2 + j *
In article <[EMAIL PROTECTED]> (at Mon, 27 Jun 2005 00:07:19 -0600), Andrew
Shewmaker <[EMAIL PROTECTED]> says:
> + for (j = 0; j < SUM_LENGTH; j++ ) {
> + snprintf(buf2 + j * 2, sizeof buf2,
> fmt, file->u.sum[j]);
file->u.sum[j] & 0xff