2001-03-29 Ulrich Drepper <drepper@redhat.com>
+ * posix/regex.c: Remove unnecessary ifs.
+
* math/bits/mathcalls.h: Remove infnan declaration.
2001-03-29 H.J. Lu <hjl@gnu.org>
#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
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;
}