OCT 修正编码规范检查
This commit is contained in:
parent
697c81b467
commit
99d7f1ff97
|
@ -1699,8 +1699,10 @@ MYDWORD chkaddr(data9 *req) {
|
||||||
|
|
||||||
#include <net/if_arp.h>
|
#include <net/if_arp.h>
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma ide diagnostic ignored "cert-err34-c"
|
||||||
int getHwAddr(char *buff, char *mac) {
|
int getHwAddr(char *buff, char *mac) {
|
||||||
if (buff == NULL || mac == NULL) {
|
if (buff == nullptr || mac == nullptr) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1712,14 +1714,15 @@ int getHwAddr(char *buff, char *mac) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 6; i++) {
|
for (i = 0; i < 6; i++) {
|
||||||
buff[i] = p[i];
|
buff[i] = (char)p[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
int arpSet(const char *ifname, char *ipStr, char *mac) {
|
int arpSet(const char *ifname, char *ipStr, char *mac) {
|
||||||
if (ifname == NULL || ipStr == NULL || mac == NULL) {
|
if (ifname == nullptr || ipStr == nullptr || mac == nullptr) {
|
||||||
printf("para is null.\n");
|
printf("para is null.\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue