aboutsummaryrefslogtreecommitdiff
path: root/posix/regex.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-03-30 06:10:52 +0000
committerUlrich Drepper <drepper@redhat.com>2001-03-30 06:10:52 +0000
commit8bca0bd407ea317948490da37ff142742c854cfb (patch)
tree96b4658d048047e8e16a67882eb693a8dbd32442 /posix/regex.c
parent28d2fb9ad9e932d7edab18815c6ff610f1f29857 (diff)
downloadglibc-8bca0bd407ea317948490da37ff142742c854cfb.zip
glibc-8bca0bd407ea317948490da37ff142742c854cfb.tar.gz
glibc-8bca0bd407ea317948490da37ff142742c854cfb.tar.bz2
Update.
* posix/regex.c: Remove unnecessary ifs.
Diffstat (limited to 'posix/regex.c')
-rw-r--r--posix/regex.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/posix/regex.c b/posix/regex.c
index 3de24ca..e3aafbc 100644
--- a/posix/regex.c
+++ b/posix/regex.c
@@ -2339,23 +2339,23 @@ regex_compile (pattern, size, syntax, bufp)
#ifdef MBS_SUPPORT
/* Initialize the wchar_t PATTERN and offset_buffer. */
p = pend = pattern = TALLOC(csize + 1, CHAR_TYPE);
- p[csize] = L'\0'; /* sentinel */
+ pattern[csize] = L'\0'; /* sentinel */
mbs_offset = TALLOC(csize + 1, int);
is_binary = TALLOC(csize + 1, char);
if (pattern == NULL || mbs_offset == NULL || is_binary == NULL)
{
- if (pattern) free(pattern);
- if (mbs_offset) free(mbs_offset);
- if (is_binary) free(is_binary);
+ free(pattern);
+ free(mbs_offset);
+ free(is_binary);
return REG_ESPACE;
}
size = convert_mbs_to_wcs(pattern, cpattern, csize, mbs_offset, is_binary);
pend = p + size;
if (size < 0)
{
- if (pattern) free(pattern);
- if (mbs_offset) free(mbs_offset);
- if (is_binary) free(is_binary);
+ free(pattern);
+ free(mbs_offset);
+ free(is_binary);
return REG_BADPAT;
}
#endif
@@ -2377,9 +2377,9 @@ regex_compile (pattern, size, syntax, bufp)
if (compile_stack.stack == NULL)
{
#ifdef MBS_SUPPORT
- if (pattern) free(pattern);
- if (mbs_offset) free(mbs_offset);
- if (is_binary) free(is_binary);
+ free(pattern);
+ free(mbs_offset);
+ free(is_binary);
#endif
return REG_ESPACE;
}