[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: read-file
From: |
Aaron Stone |
Subject: |
Re: read-file |
Date: |
Fri, 16 Jun 2006 12:11:46 -0700 |
On Fri, 2006-06-16 at 11:18 -0700, Paul Eggert wrote:
> Simon Josefsson <address@hidden> writes:
>
> > + if (buf)
> > + buf[size] = '\0';
>
> The file reading code returns NULL if the file was empty? But the
> comments makes it sound like it will return xstrdup (""), and that
> would be more consistent. You might also add a test case, to read
> from /dev/null.
If I were using a function like this, I'd expect NULL on error (and
errno set according to fopen), and an empty string if the file is empty.
Aaron
- read-file (was: strfile), Simon Josefsson, 2006/06/16
- Re: [bug-gnulib] read-file (was: strfile), Bruno Haible, 2006/06/16
- Re: read-file, Paul Eggert, 2006/06/16
- Re: read-file,
Aaron Stone <=
- Re: read-file, Simon Josefsson, 2006/06/16
- Re: read-file, Larry Jones, 2006/06/16
- Re: read-file, Simon Josefsson, 2006/06/16
- Re: read-file, Larry Jones, 2006/06/16
- Re: read-file, Paul Eggert, 2006/06/19
Re: read-file, Simon Josefsson, 2006/06/16