]> granicus.if.org Git - graphviz/commitdiff
get_int_lsb_first: use a C99 bool return type
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 11 Nov 2021 01:27:28 +0000 (17:27 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 17 Nov 2021 01:01:22 +0000 (17:01 -0800)
lib/gvc/gvusershape.c

index 3deac419dcfede6230b5f2b99a809451ad922753..0bd3ca2c0c4a38ae4443c17d11d52fe66298ee8f 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "config.h"
 
+#include <stdbool.h>
 #include <string.h>
 #include <stdlib.h>
 #include <ctype.h>
@@ -113,17 +114,17 @@ static int imagetype (usershape_t *us)
     return FT_NULL;
 }
     
-static boolean get_int_lsb_first(FILE *f, size_t sz, unsigned int *val) {
+static bool get_int_lsb_first(FILE *f, size_t sz, unsigned int *val) {
     int ch;
 
     *val = 0;
     for (size_t i = 0; i < sz; i++) {
        ch = fgetc(f);
        if (feof(f))
-           return FALSE;
+           return false;
        *val |= (unsigned)ch << 8 * i;
     }
-    return TRUE;
+    return true;
 }
        
 static boolean get_int_msb_first(FILE *f, size_t sz, unsigned int *val) {