resolver: fixed uninitialised var
This commit is contained in:
@@ -30,8 +30,11 @@ typedef unsigned short int uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
|
||||
#ifndef UINT16_MAX
|
||||
#define UINT16_MAX ((uint16_t)0xffff)
|
||||
#endif /* UINT16_MAX */
|
||||
#ifndef UINT32_MAX
|
||||
#define UINT32_MAX 0xffffffff
|
||||
#define UINT32_MAX ((uint32_t)0xffffffff)
|
||||
#endif /* UINT32_MAX */
|
||||
#ifndef SIZE_MAX
|
||||
#define SIZE_MAX UINT32_MAX
|
||||
|
||||
@@ -157,6 +157,7 @@ int resolver_srv_lookup_buf(const unsigned char *buf, size_t len,
|
||||
* RFC2052: A client MUST attempt to contact the target host
|
||||
* with the lowest-numbered priority it can reach.
|
||||
*/
|
||||
priority_min = UINT16_MAX;
|
||||
for (i = 0; i < header.ancount; ++i) {
|
||||
name_len = message_name_len(buf, len, j);
|
||||
j += name_len;
|
||||
|
||||
Reference in New Issue
Block a user