]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
code before decl
authorMichael Jerris <mike@jerris.com>
Fri, 4 Dec 2009 21:25:57 +0000 (21:25 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 4 Dec 2009 21:25:57 +0000 (21:25 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15796 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/asr_tts/mod_tts_commandline/mod_tts_commandline.c
src/mod/languages/mod_yaml/mod_yaml.c

index 3fb7aad516a93fdb4d9f9c1aed2d0fd57a8f7460..43fca2e67dc5a97fb108a8da291186b716b31c61 100644 (file)
@@ -125,10 +125,10 @@ static switch_status_t tts_commandline_speech_close(switch_speech_handle_t *sh,
 
 static switch_status_t tts_commandline_speech_feed_tts(switch_speech_handle_t *sh, char *text, switch_speech_flag_t *flags)
 {
+       char *message, *tmp, *rate;
        tts_commandline_t *info = (tts_commandline_t *) sh->private_info;
-       assert(info != NULL);
 
-       char *message, *tmp, *rate;
+       assert(info != NULL);
        
        message = switch_core_strdup(sh->memory_pool, globals.command);
        
@@ -168,9 +168,9 @@ static switch_status_t tts_commandline_speech_feed_tts(switch_speech_handle_t *s
 static switch_status_t tts_commandline_speech_read_tts(switch_speech_handle_t *sh, void *data, size_t *datalen, switch_speech_flag_t *flags)
 {
        tts_commandline_t *info = (tts_commandline_t *) sh->private_info;
-       assert(info != NULL);
-       
        size_t my_datalen = *datalen / 2;
+
+       assert(info != NULL);   
        
        if (switch_core_file_read(info->fh, data, &my_datalen) != SWITCH_STATUS_SUCCESS) {
                *datalen = my_datalen * 2;
index 2c2068c66c65a37c54e75dc518b95173c04a6575..cb19e846dedb8c9ffbceefa0cd1afe364ec1109b 100644 (file)
@@ -512,9 +512,10 @@ static switch_status_t do_config(void)
 
 SWITCH_MODULE_LOAD_FUNCTION(mod_yaml_load)
 {
+       switch_dialplan_interface_t *dp_interface;
+
        /* connect my internal structure to the blank pointer passed to me */
        *module_interface = switch_loadable_module_create_module_interface(pool, modname);
-       switch_dialplan_interface_t *dp_interface;
 
        if (do_config() != SWITCH_STATUS_SUCCESS) {
                return SWITCH_STATUS_TERM;