Browse Source

fix uninitialized variable in new resolv.conf parser

Rich Felker 9 năm trước cách đây
mục cha
commit
dcad020c9c
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/network/resolvconf.c

+ 1 - 1
src/network/resolvconf.c

@@ -10,7 +10,7 @@ int __get_resolv_conf(struct resolvconf *conf, char *search, size_t search_sz)
 	char line[256];
 	unsigned char _buf[256];
 	FILE *f, _f;
-	int nns;
+	int nns = 0;
 
 	conf->ndots = 1;
 	conf->timeout = 5;