summaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-03-31 21:05:36 +0200
committerRusty Russell <rusty@rustcorp.com.au>2009-03-31 04:35:36 +0200
commit66f92cf9d415e96a5bdd6c64de8dd8418595d2fc (patch)
tree73fe062a18c14cbc96efc4adb8f65cf5421d6a6f /kernel/module.c
parentarm: allow usage of string functions in linux/string.h (diff)
downloadlinux-66f92cf9d415e96a5bdd6c64de8dd8418595d2fc.tar.xz
linux-66f92cf9d415e96a5bdd6c64de8dd8418595d2fc.zip
strstarts: helper function for !strncmp(str, prefix, strlen(prefix))
Impact: minor new API ksplice added a "starts_with" function, which seems like a common need. When people open-code it they seem to use fixed numbers rather than strlen, so it's quite a readability win (also, strncmp() almost always wants != 0 on it). So here's strstarts(). Cc: Anders Kaseorg <andersk@mit.edu> Cc: Jeff Arnold <jbarnold@mit.edu> Cc: Tim Abbott <tabbott@mit.edu> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'kernel/module.c')
0 files changed, 0 insertions, 0 deletions