]> jfr.im git - irc/hexchat/hexchat.git/commitdiff
lua: Minor formating cleanup
authorPatrick Griffis <redacted>
Tue, 5 Apr 2016 17:05:54 +0000 (13:05 -0400)
committerPatrick Griffis <redacted>
Fri, 8 Apr 2016 01:27:40 +0000 (18:27 -0700)
plugins/lua/lua.c

index bb3464261b1ee6f2439810e76cd222be376dda4b..d5c125cb6d8a8a0212bcf6dad353bffc07ea67f5 100644 (file)
@@ -336,8 +336,10 @@ static int api_print_closure(char *word[], void *udata)
        lua_rawgeti(L, LUA_REGISTRYINDEX, info->ref);
 
        for(j = 31; j >= 1; j--)
+       {
                if(*word[j])
                        break;
+       }
        lua_newtable(L);
        for(i = 1; i <= j; i++)
        {
@@ -399,8 +401,10 @@ static int api_print_attrs_closure(char *word[], hexchat_event_attrs *attrs, voi
        base = lua_gettop(L);
        lua_rawgeti(L, LUA_REGISTRYINDEX, info->ref);
        for(j = 31; j >= 1; j--)
+       {
                if(*word[j])
                        break;
+       }
        lua_newtable(L);
        for(i = 1; i <= j; i++)
        {
@@ -1406,7 +1410,9 @@ static int reload_script(char const *filename)
                return 0;
 
        if(script->status & STATUS_ACTIVE)
+       {
                script->status |= STATUS_DEFERRED_RELOAD;
+       }
        else
        {
                char *filename = g_strdup(script->filename);
@@ -1427,8 +1433,10 @@ static void autoload_scripts(void)
        {
                char const *filename;
                while((filename = g_dir_read_name(dir)))
+               {
                        if(is_lua_file(filename))
                                load_script(filename);
+               }
                g_dir_close(dir);
        }
        g_free(path);
@@ -1617,7 +1625,9 @@ static int command_lua(char *word[], char *word_eol[], void *userdata)
        {
                if(interp)
                        if(interp->status & STATUS_ACTIVE)
+                       {
                                interp->status |= STATUS_DEFERRED_RELOAD;
+                       }
                        else
                        {
                                run_unload_hooks(interp, NULL);