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);