comparison lib/lib.c @ 311:962bbf7341f8

Tweak from Roberto Foglietta.
author Rob Landley <rob@landley.net>
date Fri, 18 Jul 2008 08:43:18 -0500
parents 8b8116214b1c
children 83c461db9df7
comparison
equal deleted inserted replaced
310:8b8116214b1c 311:962bbf7341f8
548 548
549 fd = open(name, O_RDONLY); 549 fd = open(name, O_RDONLY);
550 if (fd == -1) return 0; 550 if (fd == -1) return 0;
551 len = fdlength(fd); 551 len = fdlength(fd);
552 buf = xmalloc(len+1); 552 buf = xmalloc(len+1);
553 buf[xread(fd, buf, len)] = 0; 553 buf[xreadall(fd, buf, len)] = 0;
554 554
555 return buf; 555 return buf;
556 } 556 }
557 557
558 char *xreadfile(char *name) 558 char *xreadfile(char *name)