Browse Source

Use stdbool.h instead of manually specifing true and false :-D

master
ooxi 11 years ago
parent
commit
a78e8db5b1
2 changed files with 2 additions and 5 deletions
  1. +1
    -2
      src/xml.c
  2. +1
    -3
      test/test-xml.c

+ 1
- 2
src/xml.c View File

@@ -22,6 +22,7 @@
*/
#include <ctype.h>
#include <malloc.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#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;


+ 1
- 3
test/test-xml.c View File

@@ -20,13 +20,11 @@
*
* 3. This notice may not be removed or altered from any source distribution.
*/
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <xml.h>

static _Bool true = 1;
static _Bool false = 0;






Loading…
Cancel
Save