diff options
author | Chuhong Yuan <[email protected]> | 2019-08-09 15:10:34 +0800 |
---|---|---|
committer | Petr Mladek <[email protected]> | 2019-08-16 09:54:08 +0200 |
commit | 35c35493b0e3343522256f6054516f4e2161a6d4 (patch) | |
tree | 44d06154bcf3d4b1fa7b2cfb09c4f0e6ed04183d /scripts/bpf_helpers_doc.py | |
parent | 8ebea6ea1a7ed5d67ecbb2a493c716a2a89c0be2 (diff) |
printk: Replace strncmp() with str_has_prefix()
strncmp(str, const, len) is error-prone because len is easy to have typo.
An example is the hard-coded len has counting error or sizeof(const)
forgets - 1.
So we prefer using newly introduced str_has_prefix() to substitute
such strncmp() to make code better.
Link: http://lkml.kernel.org/r/[email protected]
Cc: "Steven Rostedt" <[email protected]>
Cc: [email protected]
Signed-off-by: Chuhong Yuan <[email protected]>
Reviewed-by: Sergey Senozhatsky <[email protected]>
[[email protected]: Slightly updated and reformatted the commit message.]
Signed-off-by: Petr Mladek <[email protected]>
Diffstat (limited to 'scripts/bpf_helpers_doc.py')
0 files changed, 0 insertions, 0 deletions