[augeas-devel] [PATCH] Avoid picking '\0' in examples

David Lutterkort dlutter at redhat.com
Mon Jul 21 18:00:43 UTC 2008


1 file changed, 1 insertion(+), 1 deletion(-)
src/fa.c |    2 +-


# HG changeset patch
# User David Lutterkort <dlutter at redhat.com>
# Date 1216663236 25200
# Node ID 6f2f5289c94a304d686b13c7aa6778ddcedbbe7d
# Parent  56814927811d0c63999364c2efdd72709c2f87f4
Avoid picking '\0' in examples.

Now, we only pick '\0' as the example character for a transition if it is
the only char for that transition.

diff -r 56814927811d -r 6f2f5289c94a src/fa.c
--- a/src/fa.c	Fri Jul 18 15:41:00 2008 -0700
+++ b/src/fa.c	Mon Jul 21 11:00:36 2008 -0700
@@ -2182,7 +2182,7 @@
         if (isalnum(c)) return c;
     for (int c = t->min; c <= t->max; c++)
         if (isprint(c)) return c;
-    return t->min;
+    return t->max;
 }
 
 /* Generate an example string for FA. Traverse all transitions and record




More information about the augeas-devel mailing list