aboutsummaryrefslogtreecommitdiff
path: root/libbb/xregcomp.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/xregcomp.c')
-rw-r--r--libbb/xregcomp.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libbb/xregcomp.c b/libbb/xregcomp.c
index 4bcb9aedf..6e9a29f49 100644
--- a/libbb/xregcomp.c
+++ b/libbb/xregcomp.c
@@ -8,16 +8,13 @@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
-#include <stdio.h>
#include "libbb.h"
#include "xregex.h"
-
-
void xregcomp(regex_t *preg, const char *regex, int cflags)
{
- int ret;
- if ((ret = regcomp(preg, regex, cflags)) != 0) {
+ int ret = regcomp(preg, regex, cflags);
+ if (ret) {
int errmsgsz = regerror(ret, preg, NULL, 0);
char *errmsg = xmalloc(errmsgsz);
regerror(ret, preg, errmsg, errmsgsz);