From e16d7dddf1ef1df0c8a00f01fede497521134b74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 7 May 2008 18:38:38 +0200 Subject: 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. --- src/video_out/video_out_opengl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/video_out/video_out_opengl.c') diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c index a82bb8f18..46fffabf8 100644 --- a/src/video_out/video_out_opengl.c +++ b/src/video_out/video_out_opengl.c @@ -694,10 +694,9 @@ static void *getdladdr (const GLubyte *_funcName) { return NULL; #elif defined(__APPLE__) - char *temp = xine_xmalloc (strlen (funcName) + 2); + char *temp; + asprintf(&temp, "_%s", funcName); void *res = NULL; - temp[0] = '_'; /* Mac OS X prepends an underscore on function names */ - strcpy (temp+1, funcName); if (NSIsSymbolNameDefined (temp)) { NSSymbol symbol = NSLookupAndBindSymbol (temp); res = NSAddressOfSymbol (symbol); -- cgit v1.2.3