Files
kernel_xiaomi_sm8250/include/linux
Rusty Russell 66f92cf9d4 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>
2009-03-31 13:05:36 +10:30
..
2009-03-27 14:43:57 -04:00
2009-03-27 14:43:59 -04:00
2009-03-28 23:55:59 -07:00
2009-03-27 14:43:59 -04:00
2009-03-27 14:43:59 -04:00
2009-03-30 14:28:58 -07:00