[vlc-devel] commit: Adding some forgotten return-statements and removing some commented-out code . (Ilkka Ollakka )

Rémi Denis-Courmont rdenis at simphalempin.com
Tue May 6 20:53:59 CEST 2008


Le Tuesday 06 May 2008 21:14:35 git version control, vous avez écrit :
> @@ -412,6 +385,7 @@ p_buffer[i+8], p_buffer[i+9], p_buffer[i+10],
> p_buffer[i+11], p_buffer[i+12], p_ free( rtmp_packet );
>                  free( tmp_buffer );
>                  msg_Err( p_access, "failed send publish start" );
> +                return -1;
>              }
>              free( rtmp_packet->body->body );
>              free( rtmp_packet->body );
> @@ -433,6 +407,7 @@ p_buffer[i+8], p_buffer[i+9], p_buffer[i+10],
> p_buffer[i+11], p_buffer[i+12], p_ free( rtmp_packet );
>              free( tmp_buffer );
>              msg_Err( p_access, "failed send bytes read" );
> +            return -1;
>          }
>          free( rtmp_packet->body->body );
>          free( rtmp_packet->body );
> @@ -1153,6 +1153,7 @@ rtmp_handler_invoke( rtmp_control_thread_t *p_thread,
> rtmp_packet_t *rtmp_packet free( tmp_rtmp_packet );
>              free( tmp_buffer );
>              msg_Err( p_thread, "failed send connection bandwith" );
> +            return VLC_EGENERIC;
>          }
>          free( tmp_rtmp_packet->body->body );
>          free( tmp_rtmp_packet->body );
> @@ -1172,6 +1173,7 @@ rtmp_handler_invoke( rtmp_control_thread_t *p_thread,
> rtmp_packet_t *rtmp_packet free( tmp_rtmp_packet );
>              free( tmp_buffer );
>              msg_Err( p_thread, "failed send server bandwith" );
> +            return VLC_EGENERIC;
>          }
>          free( tmp_rtmp_packet->body->body );
>          free( tmp_rtmp_packet->body );
> @@ -1191,6 +1193,7 @@ rtmp_handler_invoke( rtmp_control_thread_t *p_thread,
> rtmp_packet_t *rtmp_packet free( tmp_rtmp_packet );
>              free( tmp_buffer );
>              msg_Err( p_thread, "failed send clear stream" );
> +            return VLC_EGENERIC;
>          }
>          free( tmp_rtmp_packet->body->body );
>          free( tmp_rtmp_packet->body );
> @@ -1210,6 +1213,7 @@ rtmp_handler_invoke( rtmp_control_thread_t *p_thread,
> rtmp_packet_t *rtmp_packet free( tmp_rtmp_packet );
>              free( tmp_buffer );
>              msg_Err( p_thread, "failed send reply NetConnection.connect"
> ); +            return VLC_EGENERIC;
>          }
>          free( tmp_rtmp_packet->body->body );
>          free( tmp_rtmp_packet->body );
> @@ -1234,6 +1238,7 @@ rtmp_handler_invoke( rtmp_control_thread_t *p_thread,
> rtmp_packet_t *rtmp_packet free( tmp_rtmp_packet );
>              free( tmp_buffer );
>              msg_Err( p_thread, "failed send reply createStream" );
> +            return VLC_EGENERIC;
>          }
>          free( tmp_rtmp_packet->body->body );
>          free( tmp_rtmp_packet->body );
> @@ -1253,6 +1258,7 @@ rtmp_handler_invoke( rtmp_control_thread_t *p_thread,
> rtmp_packet_t *rtmp_packet free( tmp_rtmp_packet );
>              free( tmp_buffer );
>              msg_Err( p_thread, "failed send reset stream" );
> +            return VLC_EGENERIC;
>          }
>          free( tmp_rtmp_packet->body->body );
>          free( tmp_rtmp_packet->body );
> @@ -1272,6 +1278,7 @@ rtmp_handler_invoke( rtmp_control_thread_t *p_thread,
> rtmp_packet_t *rtmp_packet free( tmp_rtmp_packet );
>              free( tmp_buffer );
>              msg_Err( p_thread, "failed send clear stream" );
> +            return VLC_EGENERIC;
>          }
>          free( tmp_rtmp_packet->body->body );
>          free( tmp_rtmp_packet->body );
> @@ -1313,6 +1320,7 @@ rtmp_handler_invoke( rtmp_control_thread_t *p_thread,
> rtmp_packet_t *rtmp_packet free( tmp_rtmp_packet );
>              free( tmp_buffer );
>              msg_Err( p_thread, "failed send reply NetStream.play.reset" );
> +            return VLC_EGENERIC;
>          }
>          free( tmp_rtmp_packet->body->body );
>          free( tmp_rtmp_packet->body );
> @@ -1332,6 +1340,7 @@ rtmp_handler_invoke( rtmp_control_thread_t *p_thread,
> rtmp_packet_t *rtmp_packet free( tmp_rtmp_packet );
>              free( tmp_buffer );
>              msg_Err( p_thread, "failed send reply NetStream.play.start" );
> +            return VLC_EGENERIC;
>          }
>          free( tmp_rtmp_packet->body->body );
>          free( tmp_rtmp_packet->body );
> @@ -1463,6 +1472,7 @@ rtmp_handler_invoke( rtmp_control_thread_t *p_thread,
> rtmp_packet_t *rtmp_packet free( rtmp_packet->body->body );
>      free( rtmp_packet->body );
>      free( rtmp_packet );
> +    return VLC_SUCCESS;
>  }

Repetitive cleanup paths look... goto would help a lot.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list