[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[augeas-devel] augeas: master - * src/get.c: rename 'Short iteration' to a more helpful message



Gitweb:        http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=87fd5e5b416a0ace2d3cb7d651bb4fe75b4f8430
Commit:        87fd5e5b416a0ace2d3cb7d651bb4fe75b4f8430
Parent:        30c090776d79494e919840453ead519571300b7b
Author:        David Lutterkort <lutter redhat com>
AuthorDate:    Fri Mar 20 14:56:17 2009 -0700
Committer:     David Lutterkort <lutter redhat com>
CommitterDate: Fri Mar 20 14:56:17 2009 -0700

* src/get.c: rename 'Short iteration' to a more helpful message

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

diff --git a/src/get.c b/src/get.c
index 47e4210..d59d43e 100644
--- a/src/get.c
+++ b/src/get.c
@@ -30,6 +30,10 @@
 #include "internal.h"
 #include "memory.h"
 
+/* Our favorite error message */
+static const char *const short_iteration =
+    "Iterated lens matched less than it should";
+
 #define assert_error(state, format, args ...) \
     assert_error_at(__FILE__, __LINE__, &(state->info), format, ## args)
 
@@ -521,7 +525,7 @@ static struct tree *get_quant_star(struct lens *lens, struct state *state) {
     state->regs = old_regs;
     state->nreg = old_nreg;
     if (size != 0) {
-        get_error(state, lens, "Short iteration");
+        get_error(state, lens, "%s", short_iteration);
         state->error->pos = start;
     }
     return tree;
@@ -554,7 +558,7 @@ static struct skel *parse_quant_star(struct lens *lens, struct state *state,
     state->regs = old_regs;
     state->nreg = old_nreg;
     if (size != 0) {
-        get_error(state, lens, "Short iteration");
+        get_error(state, lens, "%s", short_iteration);
     }
     return skel;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]