diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-05-07 18:38:38 +0200 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-05-07 18:38:38 +0200 |
commit | e16d7dddf1ef1df0c8a00f01fede497521134b74 (patch) | |
tree | 00463bb8d046e99c9d4f4b87c189c347a4bb96c0 /src/video_out/video_out_opengl.c | |
parent | 657a953d5d2807ed99eddf7b45a4dc46cef626d5 (diff) | |
download | xine-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/video_out/video_out_opengl.c')
-rw-r--r-- | src/video_out/video_out_opengl.c | 5 |
1 files changed, 2 insertions, 3 deletions
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); |