summaryrefslogtreecommitdiffstats
path: root/lib/crypto/arc4.c
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2021-07-21 19:53:41 -0400
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2021-07-23 08:45:30 -0400
commit9528c19507dc9bc3d6cd96f4611d7cb80c5afcde (patch)
treefa3caa2f8e12a4edcf91873bc31a8ed2250907b3 /lib/crypto/arc4.c
parent1e3bac71c5053c99d438771fc9fa5082ae5d90aa (diff)
downloadlinux-9528c19507dc9bc3d6cd96f4611d7cb80c5afcde.tar.bz2
tracing: Clean up alloc_synth_event()
alloc_synth_event() currently has the following code to initialize the event fields and dynamic_fields: for (i = 0, j = 0; i < n_fields; i++) { event->fields[i] = fields[i]; if (fields[i]->is_dynamic) { event->dynamic_fields[j] = fields[i]; event->dynamic_fields[j]->field_pos = i; event->dynamic_fields[j++] = fields[i]; event->n_dynamic_fields++; } } 1) It would make more sense to have all fields keep track of their field_pos. 2) event->dynmaic_fields[j] is assigned twice for no reason. 3) We can move updating event->n_dynamic_fields outside the loop, and just assign it to j. This combination makes the code much cleaner. Link: https://lkml.kernel.org/r/20210721195341.29bb0f77@oasis.local.home Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'lib/crypto/arc4.c')
0 files changed, 0 insertions, 0 deletions