move variable declarations to beginning of blocks

This commit is contained in:
pvalchev 2005-12-04 07:05:34 +00:00
parent 1d6d4168a4
commit d2fae32d81
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-libxklavier_xklavier_c,v 1.1 2005/12/04 07:05:34 pvalchev Exp $
--- libxklavier/xklavier.c.orig Sat Dec 3 19:56:28 2005
+++ libxklavier/xklavier.c Sat Dec 3 19:57:02 2005
@@ -772,9 +772,10 @@ void _XklEnsureVTableInited( void )
{
if ( xklVTable == NULL )
{
+ char *p = NULL;
XklDebug( 0, "ERROR: XKL VTable is NOT initialized.\n" );
/* force the crash! */
- char *p = NULL; *p = '\0';
+ *p = '\0';
}
}

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-libxklavier_xklavier_xmm_c,v 1.1 2005/12/04 07:05:34 pvalchev Exp $
--- libxklavier/xklavier_xmm.c.orig Sat Dec 3 23:19:19 2005
+++ libxklavier/xklavier_xmm.c Sat Dec 3 23:20:03 2005
@@ -66,10 +66,11 @@ void _XklXmmUngrabShortcuts( )
const XmmSwitchOptionPtr _XklXmmGetCurrentShortcut()
{
const char* optionName = _XklXmmGetCurrentShortcutOptionName();
+ XmmSwitchOptionPtr switchOption;
XklDebug( 150, "Configured switch option: [%s]\n", optionName );
if( optionName == NULL )
return NULL;
- XmmSwitchOptionPtr switchOption = allSwitchOptions;
+ switchOption = allSwitchOptions;
while( switchOption->optionName != NULL )
{
if( !strcmp( switchOption->optionName, optionName ) )