![]() |
|
|||
0001 #include <linux/dcache.h> 0002 #include "internal.h" 0003 0004 unsigned name_to_int(const struct qstr *qstr) 0005 { 0006 const char *name = qstr->name; 0007 int len = qstr->len; 0008 unsigned n = 0; 0009 0010 if (len > 1 && *name == '0') 0011 goto out; 0012 do { 0013 unsigned c = *name++ - '0'; 0014 if (c > 9) 0015 goto out; 0016 if (n >= (~0U-9)/10) 0017 goto out; 0018 n *= 10; 0019 n += c; 0020 } while (--len > 0); 0021 return n; 0022 out: 0023 return ~0U; 0024 }
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |