From ab7d5a37adf583ba8231dba84b3b7cdf07f3d071 Mon Sep 17 00:00:00 2001 From: ulion Date: Mon, 17 Dec 2007 15:01:14 +0000 Subject: Fix indent for last commit. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25437 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmenu/menu.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'libmenu') diff --git a/libmenu/menu.c b/libmenu/menu.c index 4418d37ac8..3049553071 100644 --- a/libmenu/menu.c +++ b/libmenu/menu.c @@ -143,22 +143,22 @@ static int menu_parse_config(char* buffer) { if(r == 0) break; if (!strcasecmp(element, "binding")) { - key = asx_get_attrib("key",attribs); - cmd = asx_get_attrib("cmd",attribs); - if (key && (keycode = mp_input_get_key_from_name(key)) >= 0) { - keycode &= ~MP_NO_REPEAT_KEY; - mp_msg(MSGT_GLOBAL,MSGL_V, - "[libmenu] got keybinding element %d %s=>[%s].\n", - keycode, key, cmd ? cmd : ""); - bindings->bindings = realloc(bindings->bindings, + key = asx_get_attrib("key",attribs); + cmd = asx_get_attrib("cmd",attribs); + if (key && (keycode = mp_input_get_key_from_name(key)) >= 0) { + keycode &= ~MP_NO_REPEAT_KEY; + mp_msg(MSGT_GLOBAL,MSGL_V, + "[libmenu] got keybinding element %d %s=>[%s].\n", + keycode, key, cmd ? cmd : ""); + bindings->bindings = realloc(bindings->bindings, (bindings->binding_num+1)*sizeof(key_cmd_t)); - bindings->bindings[bindings->binding_num].key = keycode; - bindings->bindings[bindings->binding_num].cmd = cmd; - ++bindings->binding_num; - } - else - free(cmd); - free(key); + bindings->bindings[bindings->binding_num].key = keycode; + bindings->bindings[bindings->binding_num].cmd = cmd; + ++bindings->binding_num; + } + else + free(cmd); + free(key); } free(element); asx_free_attribs(attribs); -- cgit v1.2.3