]> sourceware.org Git - systemtap.git/commit
Adjust DEBUG_TRANS enabled code to work with current kernels and compilers
authorWilliam Cohen <wcohen@redhat.com>
Fri, 15 Dec 2023 02:23:34 +0000 (21:23 -0500)
committerWilliam Cohen <wcohen@redhat.com>
Fri, 15 Dec 2023 02:23:34 +0000 (21:23 -0500)
commit3e134aef3e6fd7a53fe67c1d431eda15fd8e8cdf
tree0d0c399bc3ca2c8a4b1ccb6b6bc97d1df152c74e
parent39b3819b69536e8a652920bf491442f26e187a19
Adjust DEBUG_TRANS enabled code to work with current kernels and compilers

The last element in _stp_command_names is in
_stp_command_name[STP_MAX_CMD].  Thus, the array has STP_MAX_CMD+1
elements rather than STP_MAX_CMD elements.  The compiler would flag
the access beyond the end of the array due to the incorrectly sized
array.

The min operation provided by the kernel's minmax.h include does type
checking.  Needed to type cast STP_MAX_CMD to match the other argument
and avoid the compiler flagging the type mismatch as an error.
runtime/transport/control.c
runtime/transport/transport_msgs.h
This page took 0.027117 seconds and 5 git commands to generate.