[augeas-devel] augeas: master - * src/pathx.c: use bool for boolean values
David Lutterkort
lutter at fedoraproject.org
Mon Feb 2 05:57:10 UTC 2009
Gitweb: http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=dd069cf55675c8595f353c5fe653687c7ba49ccc
Commit: dd069cf55675c8595f353c5fe653687c7ba49ccc
Parent: 0add48b694e053a7969679b7a954026627be1882
Author: David Lutterkort <lutter at redhat.com>
AuthorDate: Fri Jan 30 21:43:03 2009 -0800
Committer: David Lutterkort <lutter at redhat.com>
CommitterDate: Fri Jan 30 21:43:03 2009 -0800
* src/pathx.c: use bool for boolean values
---
src/pathx.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/pathx.c b/src/pathx.c
index 91ceeda..2f9c5b3 100644
--- a/src/pathx.c
+++ b/src/pathx.c
@@ -23,6 +23,7 @@
#include <config.h>
#include <internal.h>
#include <stdint.h>
+#include <stdbool.h>
#include <memory.h>
#include <ctype.h>
@@ -144,7 +145,7 @@ struct value {
struct locpath *locpath; /* T_LOCPATH */
int number; /* T_NUMBER */
char *string; /* T_STRING */
- unsigned int bool; /* T_BOOLEAN */
+ bool boolval; /* T_BOOLEAN */
};
};
@@ -1275,9 +1276,9 @@ int pathx_parse(const struct tree *tree, const char *txt,
}
state->value_pool_size = 8;
state->value_pool[0].tag = T_BOOLEAN;
- state->value_pool[0].bool = 0;
+ state->value_pool[0].boolval = 0;
state->value_pool[1].tag = T_BOOLEAN;
- state->value_pool[1].bool = 1;
+ state->value_pool[1].boolval = 1;
state->value_pool_used = 2;
/* Parse */
@@ -1354,7 +1355,7 @@ static int pred_matches(struct step *step, struct state *state) {
struct value *v = pop_value(state);
switch(v->tag) {
case T_BOOLEAN:
- if (! v->bool)
+ if (! v->boolval)
return 0;
break;
case T_NUMBER:
More information about the augeas-devel
mailing list