fix: strncpy equals destination size warning
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 5 Oct 2020 19:31:42 +0000 (15:31 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 9 Oct 2020 20:31:13 +0000 (16:31 -0400)
commitcb78974394a9af865e1d2d606e838dbec0de80e8
tree7f5038203ef4bd7b4927e0c21340a7466cfa98f1
parent3b36513ebf858006dcd9b26cd971c9817d2860be
fix: strncpy equals destination size warning

Some versions of GCC when called with -Wstringop-truncation will warn
when doing a copy of the same size as the destination buffer with
strncpy :

  ‘strncpy’ specified bound 256 equals destination size [-Werror=stringop-truncation]

Since we unconditionally write '\0' in the last byte, reduce the copy
size by one.

Change-Id: Idb907c9550817a06fc0dffc489740f63d440e7d4
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
lttng-syscalls.c
This page took 0.026817 seconds and 4 git commands to generate.