Do things in one go.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12419
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
char *p;
bool ret = false;
- p2 = talloc_strdup(ctx,pattern);
- s2 = talloc_strdup(ctx,string);
+ p2 = strlower_talloc(ctx, pattern);
+ s2 = strlower_talloc(ctx, string);
if (!p2 || !s2) {
TALLOC_FREE(ctx);
return false;
}
- if (!strlower_m(p2)) {
- TALLOC_FREE(ctx);
- return false;
- }
- if (!strlower_m(s2)) {
- TALLOC_FREE(ctx);
- return false;
- }
/* Remove any *? and ** from the pattern as they are meaningless */
for(p = p2; *p; p++) {