Skip to content

Commit a11aa99

Browse files
committed
Fix compilation errors
1 parent 3b76d35 commit a11aa99

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/network/dns.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ std::vector<std::string> dns_lookup_impl_with_cares(const char *domain, int fami
443443
servers.next = nullptr;
444444
inet_pton(AF_INET, SwooleG.dns_server_host.c_str(), &servers.addr.addr4);
445445
ares_set_servers(ctx.channel, &servers);
446-
if (dns_server_port != SW_DNS_SERVER_PORT) {
446+
if (SwooleG.dns_server_port != SW_DNS_SERVER_PORT) {
447447
swWarn("not support to set port of dns server");
448448
}
449449
#else

thirdparty/hiredis/read.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,8 @@ static int processLineItem(redisReader *r) {
348348
} else if (cur->type == REDIS_REPLY_BIGNUM) {
349349
/* Ensure all characters are decimal digits (with possible leading
350350
* minus sign). */
351-
for (int i = 0; i < len; i++) {
351+
int i;
352+
for (i = 0; i < len; i++) {
352353
/* XXX Consider: Allow leading '+'? Error on leading '0's? */
353354
if (i == 0 && p[0] == '-') continue;
354355
if (p[i] < '0' || p[i] > '9') {
@@ -363,7 +364,8 @@ static int processLineItem(redisReader *r) {
363364
obj = (void*)REDIS_REPLY_BIGNUM;
364365
} else {
365366
/* Type will be error or status. */
366-
for (int i = 0; i < len; i++) {
367+
int i;
368+
for (i = 0; i < len; i++) {
367369
if (p[i] == '\r' || p[i] == '\n') {
368370
__redisReaderSetError(r,REDIS_ERR_PROTOCOL,
369371
"Bad simple string value");

0 commit comments

Comments
 (0)