projects
/
oweals
/
opkg-lede.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
s/malloc/xmalloc/ s/calloc/xcalloc/ s/realloc/realloc/
[oweals/opkg-lede.git]
/
libopkg
/
xregex.c
diff --git
a/libopkg/xregex.c
b/libopkg/xregex.c
index b0cd8b9cd9e8bcfef2072de0e01573e529c0db0c..ba22b7d598964c0efd9c95bc0d0606851b6d1713 100644
(file)
--- a/
libopkg/xregex.c
+++ b/
libopkg/xregex.c
@@
-18,6
+18,7
@@
#include "includes.h"
#include "xregex.h"
#include "includes.h"
#include "xregex.h"
+#include "libbb/libbb.h"
static void print_regcomp_err(const regex_t *preg, int err);
static void print_regcomp_err(const regex_t *preg, int err);
@@
-39,10
+40,8
@@
static void print_regcomp_err(const regex_t *preg, int err)
fprintf(stderr, "%s: Error compiling regex:", __FUNCTION__);
size = regerror(err, preg, 0, 0);
fprintf(stderr, "%s: Error compiling regex:", __FUNCTION__);
size = regerror(err, preg, 0, 0);
- error = calloc(1, size);
- if (error) {
- regerror(err, preg, error, size);
- fprintf(stderr, "%s\n", error);
- }
+ error = xcalloc(1, size);
+ regerror(err, preg, error, size);
+ fprintf(stderr, "%s\n", error);
free(error);
}
free(error);
}