summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-03-06 16:12:15 -0500
committerDavid S. Miller <davem@davemloft.net>2012-03-06 16:12:15 -0500
commit95f050bf7f64be5168ae2e2c715bb0b0ded141d1 (patch)
treec2e7eb3980c89de4b387b8fc2c6806b9c8b10438 /net
parent66431a7d4570dbafb5e25c85607779ffa9c4a4bc (diff)
net: Use bool for return value of dev_valid_name().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/dev.c12
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);
* to allow sysfs to work. We also disallow any kind of
* whitespace.
*/
-int dev_valid_name(const char *name)
+bool dev_valid_name(const char *name)
{
if (*name == '\0')
- return 0;
+ return false;
if (strlen(name) >= IFNAMSIZ)
- return 0;
+ return false;
if (!strcmp(name, ".") || !strcmp(name, ".."))
- return 0;
+ return false;
while (*name) {
if (*name == '/' || isspace(*name))
- return 0;
+ return false;
name++;
}
- return 1;
+ return true;
}
EXPORT_SYMBOL(dev_valid_name);