projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c5929a
)
- use xregcomp. Untested. vda, isn't there a regfree missing here?
author
Bernhard Reutner-Fischer
<rep.dot.nop@gmail.com>
Mon, 2 Apr 2007 16:54:41 +0000
(16:54 -0000)
committer
Bernhard Reutner-Fischer
<rep.dot.nop@gmail.com>
Mon, 2 Apr 2007 16:54:41 +0000
(16:54 -0000)
text data bss dec hex filename
2522 0 0 2522 9da expr.o.r18305
2478 0 0 2478 9ae expr.o
coreutils/expr.c
patch
|
blob
|
history
diff --git
a/coreutils/expr.c
b/coreutils/expr.c
index 8eda36739fdf319cf2161cb89b20f169acb245ba..8401594b5b14c38134dde0565471690297db8558 100644
(file)
--- a/
coreutils/expr.c
+++ b/
coreutils/expr.c
@@
-226,8
+226,7
@@
of a basic regular expression is not portable; it is being ignored", pv->u.s);
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
@@
of a basic regular expression is not portable; it is being ignored", pv->u.s);
else
v = int_value(0);
}
+//FIXME: sounds like here is a bit missing: regfree(&re_buffer);
return v;
}