summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Reufer <thomas@reufer.ch>2015-01-20 20:32:21 +0100
committerThomas Reufer <thomas@reufer.ch>2015-01-20 20:44:49 +0100
commitd0924443ed4eef68f9cac6ac7cbda8fc4d63b31e (patch)
treeab906ed819c877408d0ea1b1695204e4777dd538
parentbca784c8049f4f86527324b6db115231352e93c3 (diff)
downloadvdr-plugin-rpihddevice-d0924443ed4eef68f9cac6ac7cbda8fc4d63b31e.tar.gz
vdr-plugin-rpihddevice-d0924443ed4eef68f9cac6ac7cbda8fc4d63b31e.tar.bz2
use VDR's MALLOC wrapper
-rw-r--r--ovgosd.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/ovgosd.c b/ovgosd.c
index 8f4f69e..c9e3ecd 100644
--- a/ovgosd.c
+++ b/ovgosd.c
@@ -1116,8 +1116,7 @@ public:
return;
bool specialColors = ColorFg || ColorBg;
- tColor *argb = (tColor*)malloc(Bitmap.Width() * Bitmap.Height() *
- sizeof(tColor));
+ tColor *argb = MALLOC(tColor, Bitmap.Width() * Bitmap.Height());
if (!argb)
return;
@@ -1141,8 +1140,7 @@ public:
if (!Active())
return;
- tColor *argb = (tColor*)malloc(Bitmap.Width() * Bitmap.Height() *
- sizeof(tColor));
+ tColor *argb = MALLOC(tColor, Bitmap.Width() * Bitmap.Height());
if (!argb)
return;
@@ -1200,8 +1198,7 @@ public:
int len = Utf8StrLen(s);
if (len)
{
- unsigned int *symbols =
- (unsigned int*)malloc((len + 1) * sizeof(unsigned int));
+ unsigned int *symbols = MALLOC(unsigned int, len + 1);
if (!symbols)
return;
@@ -1279,7 +1276,7 @@ public:
{
int w = x2 - x1 + 1;
int h = y2 - y1 + 1;
- tColor *argb = (tColor*)malloc(w * h * sizeof(tColor));
+ tColor *argb = MALLOC(tColor, w * h);
if (!argb)
return;