From 9109d9c5ba978ceca7981f05d67a8d4b24a610cd Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 3 May 2011 10:07:19 +0000 Subject: [PATCH] Replaced some large local variables by other means in xorriso/findjob.c --- libisoburn/trunk/xorriso/findjob.c | 22 +++++++++++++------- libisoburn/trunk/xorriso/xorriso_timestamp.h | 2 +- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/libisoburn/trunk/xorriso/findjob.c b/libisoburn/trunk/xorriso/findjob.c index a6a0740e..40a38bd0 100644 --- a/libisoburn/trunk/xorriso/findjob.c +++ b/libisoburn/trunk/xorriso/findjob.c @@ -760,17 +760,20 @@ improper_range:; */ int Findjob_set_name_expr(struct FindjoB *o, char *name_expr, int flag) { - char regexpr[2*SfileadrL+2]; + char *regexpr= NULL; regex_t *name_re; struct ExprtesT *t; int ret; - + + regexpr= TSOB_FELD(char, 2*SfileadrL+2); + if(regexpr == NULL) + {ret= -1; goto ex;} if(strlen(name_expr)>=SfileadrL) - return(0); + {ret= 0; goto ex;}; ret= Findjob_default_and(o, 0); if(ret <= 0) - return(ret); + goto ex; t= o->cursor->test; t->test_type= 1; if ((flag & 3) == 1) @@ -779,17 +782,20 @@ int Findjob_set_name_expr(struct FindjoB *o, char *name_expr, int flag) t->test_type= 16; name_re= (regex_t *) calloc(1, sizeof(regex_t)); if(name_re == NULL) - return(-1); + {ret= -1; goto ex;}; t->arg1= strdup(name_expr); if(t->arg1 == NULL) { free((char *) name_re); - return(-1); + {ret= -1; goto ex;}; } Xorriso__bourne_to_reg(name_expr, regexpr, 0); if(regcomp(name_re, regexpr, 0) != 0) - return(0); + {ret= 0; goto ex;}; t->arg2= name_re; - return(1); + ret= 1; +ex:; + Xorriso_free_meM(regexpr); + return(ret); } diff --git a/libisoburn/trunk/xorriso/xorriso_timestamp.h b/libisoburn/trunk/xorriso/xorriso_timestamp.h index eb593d9d..d2cc9f4a 100644 --- a/libisoburn/trunk/xorriso/xorriso_timestamp.h +++ b/libisoburn/trunk/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2011.05.03.095849" +#define Xorriso_timestamP "2011.05.03.100744"