Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • kernel
  • trace
  • trace_stack.c
Find file BlameHistoryPermalink
  • Steven Rostedt (VMware)'s avatar
    tracing: Use the return of str_has_prefix() to remove open coded numbers · 3d739c1f
    Steven Rostedt (VMware) authored Dec 21, 2018
    
    
    There are several locations that compare constants to the beginning of
    string variables to determine what commands should be done, then the
    constant length is used to index into the string. This is error prone as the
    hard coded numbers have to match the size of the constants. Instead, use the
    len returned from str_has_prefix() and remove the open coded string length
    sizes.
    
    Cc: Joe Perches <joe@perches.com>
    Acked-by: Masami  Hiramatsu <mhiramat@kernel.org> (for trace_probe part)
    Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
    Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
    3d739c1f
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7