summaryrefslogtreecommitdiffstats
path: root/libmpdemux/tv.c
diff options
context:
space:
mode:
authorpl <pl@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-19 13:03:22 +0000
committerpl <pl@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-19 13:03:22 +0000
commite0c43586aeb65490438ba2aca7bdc2a0ecf7f5e0 (patch)
tree7bfb01b42aace969908dd2cdf8cda746e480b99a /libmpdemux/tv.c
parentd8925752b84cfa3570a9d1ef45d490b2d0f0ee0b (diff)
downloadmpv-e0c43586aeb65490438ba2aca7bdc2a0ecf7f5e0.tar.bz2
mpv-e0c43586aeb65490438ba2aca7bdc2a0ecf7f5e0.tar.xz
x = malloc(strlen(s) + c) ... strcpy(x, s)
replaced by x = strdup(s) Note: sometimes c was 0 and that was a bug Note2: code still has to be added to check the returned value of these funcs git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3613 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/tv.c')
-rw-r--r--libmpdemux/tv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libmpdemux/tv.c b/libmpdemux/tv.c
index cc9271c334..c01fd5ca47 100644
--- a/libmpdemux/tv.c
+++ b/libmpdemux/tv.c
@@ -343,8 +343,7 @@ int tv_init(tvi_handle_t *tvh)
mp_msg(MSGT_TV, MSGL_INFO, " comment: %s\n", tvh->info->comment);
params = malloc(sizeof(tvi_param_t)*2);
- params[0].opt = malloc(strlen("input"));
- sprintf((char *)params[0].opt, "input");
+ params[0].opt = strdup("input");
params[0].value = malloc(sizeof(int));
(int)*(void **)params[0].value = tv_param_input;
params[1].opt = params[1].value = NULL;