Skip to content

Commit 33570b3

Browse files
committed
[gcc] gcc8-patch by Dominik Koch
1 parent 11a2a77 commit 33570b3

File tree

3 files changed

+3
-3
lines changed
  • drivers

3 files changed

+3
-3
lines changed

drivers/misc/mediatek/connectivity/wlan/gen2/nic/que_mgt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5021,7 +5021,7 @@ VOID qmHandleRxArpPackets(P_ADAPTER_T prAdapter, P_SW_RFB_T prSwRfb)
50215021
if (prBssInfo && prBssInfo->prStaRecOfAP && prBssInfo->prStaRecOfAP->aucMacAddr) {
50225022
if (EQUAL_MAC_ADDR(&(pucData[ETH_TYPE_LEN_OFFSET + 10]), /* source hardware address */
50235023
prBssInfo->prStaRecOfAP->aucMacAddr)) {
5024-
strncpy(apIp, &(pucData[ETH_TYPE_LEN_OFFSET + 16]), sizeof(apIp)); /* src ip address */
5024+
memcpy(apIp, &(pucData[ETH_TYPE_LEN_OFFSET + 16]), sizeof(apIp)); /* src ip address */
50255025
DBGLOG(INIT, TRACE, "get arp response from AP %d.%d.%d.%d\n",
50265026
apIp[0], apIp[1], apIp[2], apIp[3]);
50275027
}

drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_kal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ struct KAL_HALT_CTRL_T {
852852

853853
/* string operation */
854854
#define kalStrCpy(dest, src) strcpy(dest, src)
855-
#define kalStrnCpy(dest, src, n) strncpy(dest, src, n)
855+
#define kalStrnCpy(dest, src, n) memcpy(dest, src, n)
856856
#define kalStrCmp(ct, cs) strcmp(ct, cs)
857857
#define kalStrnCmp(ct, cs, n) strncmp(ct, cs, n)
858858
#define kalStrChr(s, c) strchr(s, c)

drivers/net/ethernet/mediatek/mtk_hnat/hnat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ static int hnat_probe(struct platform_device *pdev)
253253
if (err < 0)
254254
return -EINVAL;
255255

256-
strncpy(host->wan, (char *)name, IFNAMSIZ);
256+
memcpy(host->wan, (char *)name, IFNAMSIZ);
257257
dev_info(&pdev->dev, "wan = %s\n", host->wan);
258258

259259
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);

0 commit comments

Comments
 (0)