
as for strncpy does not guarantee null terminated of dest string, but snprintf does. so change code from strncpy(buffer, source, sizeof buffer); to int n = snprintf(buffer, sizeof buffer, "%s", source); assert(n >= 0 && n < sizeof buffer); test case: 1. a simple test about difference between strncpy and snprintf 2. use fmClientCli to create an alarm mock the init_tables() function so there is no need to connect to the server. add code to dump SFmAlarmDataT to check datas return. 3. one controller + one compute deploy (virtual) success deploy and create an instance. Closes-Bug: 1794701 Change-Id: I04b4c5c85782ff571e2957e12c47f2f628d2b772
stx-fault
StarlingX Fault Management
Description
Languages
Python
60.7%
C++
31.8%
Shell
3.2%
C
3.1%
Makefile
1.1%