summaryrefslogtreecommitdiff
path: root/src/input/input_vcd.c
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-05-07 18:06:56 +0200
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-05-07 18:06:56 +0200
commitbbb2643bdcc8fb3d7f29c11e1344286b042535bf (patch)
tree874f8a93f6afe13af796073c92a46dee774c946f /src/input/input_vcd.c
parent837822b5c6924be7fbc297bcef9639d7ada95a30 (diff)
downloadxine-lib-bbb2643bdcc8fb3d7f29c11e1344286b042535bf.tar.gz
xine-lib-bbb2643bdcc8fb3d7f29c11e1344286b042535bf.tar.bz2
Use proper string functions in place of sn?printf.
Instead of calling sprintf or snprintf with a "%s" format string, use the proper strcpy, strncpy, strdup or strndup function.
Diffstat (limited to 'src/input/input_vcd.c')
-rw-r--r--src/input/input_vcd.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/input/input_vcd.c b/src/input/input_vcd.c
index 02c2e83ab..760037e93 100644
--- a/src/input/input_vcd.c
+++ b/src/input/input_vcd.c
@@ -997,16 +997,9 @@ static xine_mrl_t **vcd_class_get_dir (input_class_t *this_gen, const char *file
memset(this->mrls[(i-1)], 0, sizeof(xine_mrl_t));
}
- if(this->mrls[(i-1)]->mrl) {
- this->mrls[(i-1)]->mrl = (char *)
- realloc(this->mrls[(i-1)]->mrl, strlen(mrl) + 1);
- }
- else {
- this->mrls[(i-1)]->mrl = (char *) xine_xmalloc(strlen(mrl) + 1);
- }
-
this->mrls[i-1]->origin = NULL;
- sprintf(this->mrls[i-1]->mrl, "%s", mrl);
+ free(this->mrls[(i-1)]->mrl);
+ this->mrls[i-1]->mrl = strdup(mrl);
this->mrls[i-1]->link = NULL;
this->mrls[i-1]->type = (0 | mrl_vcd);