Skip to content
  • Thomas Gleixner's avatar
    tracing: replace the crude (unsigned) -1 hackery · 2c7eea4c
    Thomas Gleixner authored
    
    
    Impact: cleanup
    
    The command line recorder uses (unsigned) -1 to mark non mapped
    entries in the pid to command line maps. The validity check is
    completely unintuitive: idx >= SAVED_CMDLINES
    
    There is no need for such casting games. Use a constant to mark
    unmapped entries and check for that constant to make the code readable
    and understandable.
    
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Cc: Steven Rostedt <srostedt@redhat.com>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    LKML-Reference: <new-submission>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    2c7eea4c