[augeas-devel] augeas: master - * src/augtool.c (cmd_match): check return from aug_match more defensively

David Lutterkort lutter at fedoraproject.org
Wed Feb 11 21:43:17 UTC 2009


Gitweb:        http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=4750356efb6a70ff13ea536d19996e4181aa2578
Commit:        4750356efb6a70ff13ea536d19996e4181aa2578
Parent:        5f1f60730210fc1696f138dde7249af6015ee6c7
Author:        David Lutterkort <lutter at redhat.com>
AuthorDate:    Wed Feb 11 10:23:44 2009 -0800
Committer:     David Lutterkort <lutter at redhat.com>
CommitterDate: Wed Feb 11 10:23:44 2009 -0800

* src/augtool.c (cmd_match): check return from aug_match more defensively

---
 src/augtool.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/augtool.c b/src/augtool.c
index af6702b..2e48a9b 100644
--- a/src/augtool.c
+++ b/src/augtool.c
@@ -133,7 +133,7 @@ static int cmd_match(char *args[]) {
     int filter = (args[1] != NULL) && (strlen(args[1]) > 0);
 
     cnt = aug_match(aug, pattern, &matches);
-    if (cnt == -1) {
+    if (cnt < 0) {
         printf("  (error matching %s)\n", pattern);
         return -1;
     }




More information about the augeas-devel mailing list