diff options
| author | David S. Miller <davem@davemloft.net> | 2012-03-06 16:12:15 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2012-03-06 16:12:15 -0500 |
| commit | 95f050bf7f64be5168ae2e2c715bb0b0ded141d1 (patch) | |
| tree | c2e7eb3980c89de4b387b8fc2c6806b9c8b10438 /net/core | |
| parent | 66431a7d4570dbafb5e25c85607779ffa9c4a4bc (diff) | |
net: Use bool for return value of dev_valid_name().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
| -rw-r--r-- | net/core/dev.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 5ef3b65c3687..0090809af7bd 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
| @@ -848,21 +848,21 @@ EXPORT_SYMBOL(dev_get_by_flags_rcu); | |||
| 848 | * to allow sysfs to work. We also disallow any kind of | 848 | * to allow sysfs to work. We also disallow any kind of |
| 849 | * whitespace. | 849 | * whitespace. |
| 850 | */ | 850 | */ |
| 851 | int dev_valid_name(const char *name) | 851 | bool dev_valid_name(const char *name) |
| 852 | { | 852 | { |
| 853 | if (*name == '\0') | 853 | if (*name == '\0') |
| 854 | return 0; | 854 | return false; |
| 855 | if (strlen(name) >= IFNAMSIZ) | 855 | if (strlen(name) >= IFNAMSIZ) |
| 856 | return 0; | 856 | return false; |
| 857 | if (!strcmp(name, ".") || !strcmp(name, "..")) | 857 | if (!strcmp(name, ".") || !strcmp(name, "..")) |
| 858 | return 0; | 858 | return false; |
| 859 | 859 | ||
| 860 | while (*name) { | 860 | while (*name) { |
| 861 | if (*name == '/' || isspace(*name)) | 861 | if (*name == '/' || isspace(*name)) |
| 862 | return 0; | 862 | return false; |
| 863 | name++; | 863 | name++; |
| 864 | } | 864 | } |
| 865 | return 1; | 865 | return true; |
| 866 | } | 866 | } |
| 867 | EXPORT_SYMBOL(dev_valid_name); | 867 | EXPORT_SYMBOL(dev_valid_name); |
| 868 | 868 | ||
