From: Rudolf Polzer Date: Wed, 2 Nov 2011 14:40:25 +0000 (+0100) Subject: fix some va() use difference X-Git-Tag: xonotic-v0.6.0~185 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=302bad1fd3d3627af8deeee2330264f0f1719f0c;p=xonotic%2Fdarkplaces.git fix some va() use difference --- diff --git a/host.c b/host.c index be123bf9..1abbbde4 100644 --- a/host.c +++ b/host.c @@ -1065,11 +1065,10 @@ static void Host_InitSession(void) // load the session ID into the read-only cvar if ((i = COM_CheckParm("-sessionid")) && (i + 1 < com_argc)) { - char vabuf[1024]; if(com_argv[i+1][0] == '.') Cvar_SetQuick(&sessionid, com_argv[i+1]); else - Cvar_SetQuick(&sessionid, va(vabuf, sizeof(vabuf), ".%s", com_argv[i+1])); + Cvar_SetQuick(&sessionid, va(".%s", com_argv[i+1])); } } void Host_LockSession(void) @@ -1079,8 +1078,7 @@ void Host_LockSession(void) locksession_run = true; if(locksession.integer != 0) { - char vabuf[1024]; - locksession_fh = FS_SysOpen(va(vabuf, sizeof(vabuf), "%slock%s", *fs_userdir ? fs_userdir : fs_basedir, sessionid.string), "wl", false); + locksession_fh = FS_SysOpen(va("%slock%s", *fs_userdir ? fs_userdir : fs_basedir, sessionid.string), "wl", false); // TODO maybe write the pid into the lockfile, while we are at it? may help server management tools if(!locksession_fh) {