summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2019-02-25 19:55:37 +0100
committerQuentin Young <qlyoung@cumulusnetworks.com>2019-02-26 00:00:16 +0100
commitb08047f82d887d1ea639bbfe97147b46572099d5 (patch)
tree0651f297cdb62015696c6f75e8c4f8ae34f2b7f2 /lib
parent*: use proper bool initializers & fix comparisons (diff)
downloadfrr-b08047f82d887d1ea639bbfe97147b46572099d5.tar.xz
frr-b08047f82d887d1ea639bbfe97147b46572099d5.zip
*: return bool from boolean functions
Not 1 or 0. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/frrstr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/frrstr.c b/lib/frrstr.c
index 85d968182..fd337073f 100644
--- a/lib/frrstr.c
+++ b/lib/frrstr.c
@@ -155,13 +155,13 @@ void frrstr_strvec_free(vector v)
bool begins_with(const char *str, const char *prefix)
{
if (!str || !prefix)
- return 0;
+ return false;
size_t lenstr = strlen(str);
size_t lenprefix = strlen(prefix);
if (lenprefix > lenstr)
- return 0;
+ return false;
return strncmp(str, prefix, lenprefix) == 0;
}