[hackers] [quark] Fix potentially uninitialized vars || sin
commit 7ecf520b30854f0a35b40bbef45870e1538666b9
Author: sin <sin_AT_2f30.org>
Date: Sat Aug 16 01:53:23 2014 +0100
Fix potentially uninitialized vars
diff --git a/quark.c b/quark.c
index 6fa95d8..bf2bed6 100644
--- a/quark.c
+++ b/quark.c
_AT_@ -184,7 +184,7 @@ putresentry(int type, ...) {
void
responsefiledata(int fd, off_t size) {
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(size_in = n; (m = write(req.fd, buf, size_in)) > 0; size_in -= m);
_AT_@ -535,8 +535,8 @@ usage(void) {
int
main(int argc, char *argv[]) {
struct addrinfo hints, *ai = NULL;
- struct passwd *upwd;
- struct group *gpwd;
+ struct passwd *upwd = NULL;
+ struct group *gpwd = NULL;
int i;
ARGBEGIN {
Received on Sat Aug 16 2014 - 12:07:15 CEST
This archive was generated by hypermail 2.3.0
: Sat Aug 16 2014 - 12:12:09 CEST