Fix build warnings in phy simulators

This commit is contained in:
Roberto Louro Magueta
2022-07-08 11:17:28 +01:00
parent a574c47e9e
commit b0bcff0da2
2 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -299,7 +299,7 @@ int main(int argc, char **argv)
break; break;
case 'X': case 'X':
strncpy(gNBthreads, optarg, sizeof(gNBthreads)); strncpy(gNBthreads, optarg, sizeof(gNBthreads)-1);
gNBthreads[sizeof(gNBthreads)-1]=0; gNBthreads[sizeof(gNBthreads)-1]=0;
break; break;
+1 -1
View File
@@ -670,7 +670,7 @@ int main(int argc, char **argv)
break; break;
case 'X': case 'X':
strncpy(gNBthreads, optarg, sizeof(gNBthreads)); strncpy(gNBthreads, optarg, sizeof(gNBthreads)-1);
gNBthreads[sizeof(gNBthreads)-1]=0; gNBthreads[sizeof(gNBthreads)-1]=0;
break; break;