summaryrefslogtreecommitdiffstats
path: root/get_path.c
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-03-14 23:42:03 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-03-14 23:42:03 +0000
commit6ca07e4c8bc5b2e794bf89b4c1283d6d8c03c76e (patch)
treea06417ce956c54078716d1da8056d56a17e20ecc /get_path.c
parentee2ac03ccc9a1e75aaf94143fb757a4a60ded956 (diff)
downloadmpv-6ca07e4c8bc5b2e794bf89b4c1283d6d8c03c76e.tar.bz2
mpv-6ca07e4c8bc5b2e794bf89b4c1283d6d8c03c76e.tar.xz
Get rid of pointless tmppath variable in set_path_env().
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30895 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'get_path.c')
-rw-r--r--get_path.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/get_path.c b/get_path.c
index 0412dbaa8d..ad3c422639 100644
--- a/get_path.c
+++ b/get_path.c
@@ -159,11 +159,9 @@ char *get_path(const char *filename){
void set_path_env(void)
{
/*make our codec dirs available for LoadLibraryA()*/
- char tmppath[MAX_PATH*2 + 1];
char win32path[MAX_PATH];
#ifdef __CYGWIN__
cygwin_conv_to_full_win32_path(BINARY_CODECS_PATH, win32path);
- strcpy(tmppath,win32path);
#else /*__CYGWIN__*/
/* Expand to absolute path unless it's already absolute */
if (!strstr(BINARY_CODECS_PATH,":") && BINARY_CODECS_PATH[0] != '\\') {
@@ -171,10 +169,9 @@ void set_path_env(void)
strcpy(strrchr(win32path, '\\') + 1, BINARY_CODECS_PATH);
}
else strcpy(win32path, BINARY_CODECS_PATH);
- strcpy(tmppath,win32path);
#endif /*__CYGWIN__*/
- mp_msg(MSGT_WIN32, MSGL_V,"Setting PATH to %s\n",tmppath);
- if (!SetEnvironmentVariableA("PATH", tmppath))
+ mp_msg(MSGT_WIN32, MSGL_V, "Setting PATH to %s\n", win32path);
+ if (!SetEnvironmentVariableA("PATH", win32path))
mp_msg(MSGT_WIN32, MSGL_WARN, "Cannot set PATH!");
}
#endif /* (defined(__MINGW32__) || defined(__CYGWIN__)) && defined(CONFIG_WIN32DLL) */