lpd: new applet by Vladimir Dronnikov <dronnikov AT gmail.com>

This commit is contained in:
Denis Vlasenko
2008-02-24 23:32:36 +00:00
parent a2f47358eb
commit f99afb5dff
6 changed files with 24 additions and 5 deletions

View File

@@ -161,8 +161,7 @@ char *xmalloc_reads(int fd, char *buf)
}
/* nonblock_safe_read() because we are used by e.g. shells */
if (nonblock_safe_read(fd, p, 1) != 1) { /* EOF/error */
if (p == buf) {
/* we read nothing [and buf was NULL initially] */
if (p == buf) { /* we read nothing */
free(buf);
return NULL;
}