summaryrefslogtreecommitdiff
path: root/lib/json.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2018-09-01 05:05:30 +0200
committerGitHub <noreply@github.com>2018-09-01 05:05:30 +0200
commit1fbd4e382aaf654dcb13d27bec1f7c6c145b533f (patch)
tree4ebd49e15f6714986c2e9bb7994528ba24f5d9ac /lib/json.c
parent04f04f0fa5cc206c655658b3c556932d57a95ac6 (diff)
parentca61fd2587504f14d966c73563b61140557dde65 (diff)
Merge pull request #2945 from dslicenc/bgp-ospf-json
bgpd/ospfd: make bgp and ospf json response a bit more consistent
Diffstat (limited to 'lib/json.c')
-rw-r--r--lib/json.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/json.c b/lib/json.c
index 40b6aadaa3..4ea20ba178 100644
--- a/lib/json.c
+++ b/lib/json.c
@@ -28,15 +28,15 @@
* is the *last* keyword on the line no matter
* what.
*/
-int use_json(const int argc, struct cmd_token *argv[])
+bool use_json(const int argc, struct cmd_token *argv[])
{
if (argc == 0)
- return 0;
+ return false;
if (argv[argc - 1]->arg && strmatch(argv[argc - 1]->text, "json"))
- return 1;
+ return true;
- return 0;
+ return false;
}
void json_object_string_add(struct json_object *obj, const char *key,