summaryrefslogtreecommitdiff
path: root/blacklist.c
diff options
context:
space:
mode:
authorChristian Wieninger <cwieninger@gmx.de>2012-04-06 20:27:04 +0200
committerChristian Wieninger <cwieninger@gmx.de>2012-04-06 20:27:04 +0200
commit3bd2658c85f00269583259d5912c88f031b9599f (patch)
tree6f95f40fbaf30b383a16f566d84a0ade7b448cec /blacklist.c
parent65f1e5030f076c530a5a6a37ead43cf7d9d86325 (diff)
downloadvdr-plugin-epgsearch-3bd2658c85f00269583259d5912c88f031b9599f.tar.gz
vdr-plugin-epgsearch-3bd2658c85f00269583259d5912c88f031b9599f.tar.bz2
bugtracker #929, bunch of warning fixes, thanks to Joe_D for providing this patch
Diffstat (limited to 'blacklist.c')
-rw-r--r--blacklist.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/blacklist.c b/blacklist.c
index 62979ed..eadaa85 100644
--- a/blacklist.c
+++ b/blacklist.c
@@ -216,20 +216,22 @@ const char *cBlacklist::ToText(void)
while (SearchExtCat)
{
char* catvalue = NULL;
- msprintf(&catvalue, "%s", catvalues[index]);
- while(strstr(catvalue, ":"))
- catvalue = strreplace(catvalue, ":", "!^colon^!"); // ugly: replace with something, that should not happen to be part ofa category value
- while(strstr(catvalue, "|"))
- catvalue = strreplace(catvalue, "|", "!^pipe^!"); // ugly: replace with something, that should not happen to be part of a regular expression
-
- if (index == 0)
- msprintf(&tmp_catvalues, "%d#%s", SearchExtCat->id, catvalue);
- else
- {
- char* temp = tmp_catvalues;
- msprintf(&tmp_catvalues, "%s|%d#%s", tmp_catvalues, SearchExtCat->id, catvalue);
- free(temp);
- }
+ if (msprintf(&catvalue, "%s", catvalues[index])!=-1)
+ {
+ while(strstr(catvalue, ":"))
+ catvalue = strreplace(catvalue, ":", "!^colon^!"); // ugly: replace with something, that should not happen to be part ofa category value
+ while(strstr(catvalue, "|"))
+ catvalue = strreplace(catvalue, "|", "!^pipe^!"); // ugly: replace with something, that should not happen to be part of a regular expression
+
+ if (index == 0)
+ msprintf(&tmp_catvalues, "%d#%s", SearchExtCat->id, catvalue);
+ else
+ {
+ char* temp = tmp_catvalues;
+ msprintf(&tmp_catvalues, "%s|%d#%s", tmp_catvalues, SearchExtCat->id, catvalue);
+ free(temp);
+ }
+ }
SearchExtCat = SearchExtCats.Next(SearchExtCat);
index++;
free(catvalue);