diff options
author | Stephen Kitt <[email protected]> | 2020-01-24 21:03:07 +0100 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2020-01-29 21:03:33 -0700 |
commit | 6a365874a43c43b227492266f59cd68ecc5a6f83 (patch) | |
tree | 6c1e771042b2d7bbcbb08c61a0baef104ddf8b35 /tools/perf/util/trace-event-scripting.c | |
parent | a258edbca2d94a4d902daeecb3073c88b57ac7ad (diff) |
drbd: fifo_alloc() should use struct_size
Switching to struct_size for the allocation in fifo_alloc avoids
hard-coding the type of fifo_buffer.values in fifo_alloc. It also
provides overflow protection; to avoid pessimistic code being
generated by the compiler as a result, this patch also switches
fifo_size to unsigned, propagating the change as appropriate.
Reviewed-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Stephen Kitt <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions