Skip to content

Commit

Permalink
Rollback: don't use '_s' functions (MS specific)
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph2 committed Jan 9, 2021
1 parent 9435ad1 commit bafc40f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions flsemu/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ void FlsEmu_OpenCreate(uint8_t segmentIdx)
segment->currentPage = 0x00;
segment->alloctedPageSize = FlsEmu_AllocatedSize(segmentIdx);
length = strlen(segment->name);
strncpy_s((char *)rom, 1024, (char *)segment->name, length);
strncpy((char *)rom, (char *)segment->name, length);
rom[length] = '\x00';
strcat_s((char *)rom, 1024, ".rom");
strcat((char *)rom, ".rom");
numPages = FlsEmu_NumPages(segmentIdx);
result = FlsEmu_OpenCreatePersitentArray(rom, segment->alloctedPageSize * numPages, segment->persistentArray);
if (result == OPEN_ERROR) {
Expand Down
4 changes: 2 additions & 2 deletions src/hw/linux/tui.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ void XcpTui_Init(void)

#if defined(SOCKET_CAN)
ext = XCP_ON_CAN_IS_EXTENDED_IDENTIFIER(XCP_ON_CAN_INBOUND_IDENTIFIER);
sprintf_s(buf, 128, "XCPonCAN listening on 0x%04x [%s]\n",
sprintf(buf, "XCPonCAN listening on 0x%04x [%s]\n",
XCP_ON_CAN_STRIP_IDENTIFIER(XCP_ON_CAN_INBOUND_IDENTIFIER), ext ? "EXT" : "STD"
);
#elif defined(ETHER)
sprintf_s(buf, 128, "XCPonEth -- Listening on port %d / %s [%s]",
sprintf(buf, "XCPonEth -- Listening on port %d / %s [%s]",
Xcp_Options.port, Xcp_Options.tcp ? "TCP" : "UDP",Xcp_Options.ipv6 ? "IPv6" : "IPv4"
);
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/tl/eth/linuxeth.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ void XcpTl_Init(void)
Xcp_PduOut.data = &Xcp_PduOutBuffer[0];
memset(&hints, 0, sizeof(hints));
XcpTl_Connection.socketType = Xcp_Options.tcp ? SOCK_STREAM : SOCK_DGRAM;
sprintf_s(port, 16, "%d", Xcp_Options.port);
sprintf(port, "%d", Xcp_Options.port);
hints.ai_family = Xcp_Options.ipv6 ? PF_INET6: PF_INET;
hints.ai_socktype = XcpTl_Connection.socketType;
hints.ai_flags = AI_NUMERICHOST | AI_PASSIVE;
Expand Down

0 comments on commit bafc40f

Please sign in to comment.