Commit 502dd95
committed
prov/verbs: Fix compiler warning on the bound of 'strncpy' call
Gcc 15 complains that the length parameter for strncpy() is derived from
the source string. It is not a real concern since the result is guaranteed
to be less than the buffer size due to the MIN operation. However, the
calculation is slightly off anyway. So rewite the logic to kill two birds
with one stone.
Signed-off-by: Jianxin Xiong <[email protected]>1 parent 8f506de commit 502dd95
1 file changed
+3
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
383 | 380 | | |
384 | 381 | | |
385 | 382 | | |
| |||
0 commit comments