mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
Use stdbool more widely
We already use the C99 bool type from stdbool.h in a few places. However there are many other places we represent boolean values as plain ints. This patch changes that. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
79eebb23db
commit
17625371ee
12 changed files with 39 additions and 37 deletions
3
util.h
3
util.h
|
@ -2,6 +2,7 @@
|
|||
#define _UTIL_H
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <getopt.h>
|
||||
|
||||
/*
|
||||
|
@ -68,7 +69,7 @@ extern char *join_path(const char *path, const char *name);
|
|||
* @param len The string length including terminator
|
||||
* @return 1 if a valid printable string, 0 if not
|
||||
*/
|
||||
int util_is_printable_string(const void *data, int len);
|
||||
bool util_is_printable_string(const void *data, int len);
|
||||
|
||||
/*
|
||||
* Parse an escaped character starting at index i in string s. The resulting
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue