Files
bpfire/src/patches/vdr-plugin-epgsearch-gcc44.patch
2012-08-19 15:24:52 -04:00

79 lines
3.1 KiB
Diff

diff -urNad vdr-plugin-epgsearch-0.9.24~/epgsearchsvdrp.c vdr-plugin-epgsearch-0.9.24/epgsearchsvdrp.c
--- vdr-plugin-epgsearch-0.9.24~/epgsearchsvdrp.c 2008-04-13 20:53:44.000000000 +0200
+++ vdr-plugin-epgsearch-0.9.24/epgsearchsvdrp.c 2009-10-26 20:27:07.000000000 +0100
@@ -742,12 +742,13 @@
{
if (*Option)
{
- char* pipePos = strchr(Option, '|');
+ const char* pipePos = strchr(Option, '|');
if (pipePos)
{
- *pipePos = 0;
- const char* oldName = Option;
- const char* newName = pipePos+1;
+ int index = pipePos - Option;
+ char* oldName = strdup(Option);
+ *(oldName + index) = 0;
+ const char* newName = oldName + index + 1;
if (strlen(oldName) > 0 && strlen(newName) > 0)
{
cChannelGroup *changrp = ChannelGroups.GetGroupByName(Option);
@@ -769,15 +770,18 @@
}
ChannelGroups.Save();
SearchExts.Save();
+ free(oldName);
return cString::sprintf("renamed channel group '%s' to '%s'", oldName, newName);
}
else
{
+ free(oldName);
ReplyCode = 901;
return cString::sprintf("channel group '%s' not defined", Option);
}
}
+ free(oldName);
}
ReplyCode = 901;
return cString("Error in channel group parameters");
diff -urNad vdr-plugin-epgsearch-0.9.24~/epgsearchtools.c vdr-plugin-epgsearch-0.9.24/epgsearchtools.c
--- vdr-plugin-epgsearch-0.9.24~/epgsearchtools.c 2008-04-13 20:53:42.000000000 +0200
+++ vdr-plugin-epgsearch-0.9.24/epgsearchtools.c 2009-10-26 20:27:07.000000000 +0100
@@ -743,7 +743,7 @@
while(tmp)
{
// extract a single line
- char* lf = strchr(tmp, '\n');
+ const char* lf = strchr(tmp, '\n');
char* line = NULL;
if (lf)
line = strndup(tmp, lf-tmp);
diff -urNad vdr-plugin-epgsearch-0.9.24~/menu_dirselect.c vdr-plugin-epgsearch-0.9.24/menu_dirselect.c
--- vdr-plugin-epgsearch-0.9.24~/menu_dirselect.c 2008-04-13 20:53:44.000000000 +0200
+++ vdr-plugin-epgsearch-0.9.24/menu_dirselect.c 2009-10-26 20:27:07.000000000 +0100
@@ -83,7 +83,7 @@
return 1;
do
{
- char* pos = strchr(szDir, '~');
+ const char* pos = strchr(szDir, '~');
if (pos)
{
iLevel++;
diff -urNad vdr-plugin-epgsearch-0.9.24~/searchtimer_thread.c vdr-plugin-epgsearch-0.9.24/searchtimer_thread.c
--- vdr-plugin-epgsearch-0.9.24~/searchtimer_thread.c 2008-04-28 18:22:31.000000000 +0200
+++ vdr-plugin-epgsearch-0.9.24/searchtimer_thread.c 2009-10-26 20:27:28.000000000 +0100
@@ -565,8 +565,8 @@
if (!isempty(aux))
{
tmpaux = strdup(aux);
- char* begin = strstr(aux, "<epgsearch>");
- char* end = strstr(aux, "</epgsearch>");
+ const char* begin = strstr(aux, "<epgsearch>");
+ const char* end = strstr(aux, "</epgsearch>");
if (begin && end)
{
if (begin == aux) strcpy(tmpaux, ""); else strn0cpy(tmpaux, aux, begin-aux+1);