Fix potentially uninitialized vars

This commit is contained in:
sin 2014-08-16 01:53:23 +01:00 committed by FRIGN
parent df8437d4f6
commit 7ecf520b30

View file

@ -184,7 +184,7 @@ putresentry(int type, ...) {
void void
responsefiledata(int fd, off_t size) { responsefiledata(int fd, off_t size) {
char buf[BUFSIZ]; char buf[BUFSIZ];
ssize_t n, m, size_in; ssize_t n, m = 0, size_in;
for (; (n = read(fd, buf, MIN(size, sizeof buf))) > 0; size -= n) for (; (n = read(fd, buf, MIN(size, sizeof buf))) > 0; size -= n)
for(size_in = n; (m = write(req.fd, buf, size_in)) > 0; size_in -= m); for(size_in = n; (m = write(req.fd, buf, size_in)) > 0; size_in -= m);
@ -535,8 +535,8 @@ usage(void) {
int int
main(int argc, char *argv[]) { main(int argc, char *argv[]) {
struct addrinfo hints, *ai = NULL; struct addrinfo hints, *ai = NULL;
struct passwd *upwd; struct passwd *upwd = NULL;
struct group *gpwd; struct group *gpwd = NULL;
int i; int i;
ARGBEGIN { ARGBEGIN {