svn commit: trunk/busybox/coreutils

aldot at busybox.net aldot at busybox.net
Mon Apr 2 16:54:41 UTC 2007


Author: aldot
Date: 2007-04-02 09:54:41 -0700 (Mon, 02 Apr 2007)
New Revision: 18306

Log:
- use xregcomp. Untested. vda, isn't there a regfree missing here?
   text    data     bss     dec     hex filename
   2522       0       0    2522     9da expr.o.r18305
   2478       0       0    2478     9ae expr.o


Modified:
   trunk/busybox/coreutils/expr.c


Changeset:
Modified: trunk/busybox/coreutils/expr.c
===================================================================
--- trunk/busybox/coreutils/expr.c	2007-04-02 16:41:24 UTC (rev 18305)
+++ trunk/busybox/coreutils/expr.c	2007-04-02 16:54:41 UTC (rev 18306)
@@ -226,8 +226,7 @@
 
 	memset(&re_buffer, 0, sizeof(re_buffer));
 	memset(re_regs, 0, sizeof(*re_regs));
-	if (regcomp(&re_buffer, pv->u.s, 0) != 0)
-		bb_error_msg_and_die("invalid regular expression");
+	xregcomp(&re_buffer, pv->u.s, 0);
 
 	/* expr uses an anchored pattern match, so check that there was a
 	 * match and that the match starts at offset 0. */
@@ -246,6 +245,7 @@
 		else
 			v = int_value(0);
 	}
+//FIXME: sounds like here is a bit missing: regfree(&re_buffer);
 	return v;
 }
 




More information about the busybox-cvs mailing list