From 8f8a5a4b17fbed9774926e6b92cb5fd879a551a3 Mon Sep 17 00:00:00 2001 From: huangxin Date: Mon, 12 Dec 2022 10:26:55 +0800 Subject: [PATCH] =?UTF-8?q?OCT=201.=20=E4=BF=AE=E6=AD=A3=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=A7=84=E8=8C=83=E6=A3=80=E6=9F=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- srcs/open_dhcp/query.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcs/open_dhcp/query.cpp b/srcs/open_dhcp/query.cpp index c93b431..43a3e09 100644 --- a/srcs/open_dhcp/query.cpp +++ b/srcs/open_dhcp/query.cpp @@ -468,7 +468,7 @@ static int delete_dhcpd_rangeset(data19 *req, const char *pRequest) { HASH_FIND_INT(delMap, &st_addr, delItem); if (delItem == nullptr) { - hash_map *s = (struct hash_map *)malloc(sizeof(struct hash_map)); + auto *s = (struct hash_map *)malloc(sizeof(struct hash_map)); s->key = st_addr; s->value = en_addr; HASH_ADD_INT(delMap, key, s); @@ -520,7 +520,7 @@ static int delete_dhcpd_rangeset(data19 *req, const char *pRequest) { } } - cfig.rangeCount = resCount; + cfig.rangeCount = (char)resCount; const char *pStrPro = proto_create_new(pRspRoot, 200); fp += sprintf(fp, "%s", pStrPro);