From a78e8db5b103f199461b30d16ca229c38e3df2ce Mon Sep 17 00:00:00 2001 From: ooxi <85fcd0ef4ec8@f977375cdcd6.anonbox.net> Date: Wed, 31 Oct 2012 20:50:09 +0100 Subject: [PATCH] Use stdbool.h instead of manually specifing true and false :-D --- src/xml.c | 3 +-- test/test-xml.c | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/xml.c b/src/xml.c index 863c5d7..a9fb15e 100644 --- a/src/xml.c +++ b/src/xml.c @@ -22,6 +22,7 @@ */ #include #include +#include #include #include #include "xml.h" @@ -117,8 +118,6 @@ static size_t get_zero_terminated_array_elements(struct xml_node** nodes) { * @return true gdw. a == b */ static _Bool xml_string_equals(struct xml_string* a, struct xml_string* b) { - _Bool const true = 1; - _Bool const false = 0; if (a->length != b->length) { return false; diff --git a/test/test-xml.c b/test/test-xml.c index 82c2f3f..7111a0e 100644 --- a/test/test-xml.c +++ b/test/test-xml.c @@ -20,13 +20,11 @@ * * 3. This notice may not be removed or altered from any source distribution. */ +#include #include #include #include -static _Bool true = 1; -static _Bool false = 0; -