summaryrefslogtreecommitdiff
path: root/src/post
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-05-07 18:38:38 +0200
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-05-07 18:38:38 +0200
commite16d7dddf1ef1df0c8a00f01fede497521134b74 (patch)
tree00463bb8d046e99c9d4f4b87c189c347a4bb96c0 /src/post
parent657a953d5d2807ed99eddf7b45a4dc46cef626d5 (diff)
downloadxine-lib-e16d7dddf1ef1df0c8a00f01fede497521134b74.tar.gz
xine-lib-e16d7dddf1ef1df0c8a00f01fede497521134b74.tar.bz2
Replace strn?cpy() + strn?cat() calls with a?sprintf().
Instead of creating strings through a series os string copy and concatenations, use directly the appropriate printf-like function.
Diffstat (limited to 'src/post')
-rw-r--r--src/post/planar/pp.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/post/planar/pp.c b/src/post/planar/pp.c
index 3c6fe8767..51d28b33d 100644
--- a/src/post/planar/pp.c
+++ b/src/post/planar/pp.c
@@ -20,6 +20,10 @@
* plugin for ffmpeg libpostprocess
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "xine_internal.h"
#include "post.h"
#include "xineutils.h"
@@ -119,12 +123,9 @@ static char * get_help (void) {
);
static char *help = NULL;
- if( !help ) {
- help = malloc( strlen(help1) + strlen(help2) + strlen(pp_help) + 1);
- strcpy(help, help1);
- strcat(help, pp_help);
- strcat(help, help2);
- }
+ if( !help )
+ asprintf(&help, "%s%s%s", help1, help2, pp_help);
+
return help;
}