diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 90718ddf2a..7294e7f082 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -53,9 +53,9 @@ */ void avcodec_register_all(void) { - static int inited = 0; + static int inited; - if (inited != 0) + if (inited) return; inited = 1; diff --git a/libavformat/allformats.c b/libavformat/allformats.c index 515e6f41c0..ad2d30aad2 100644 --- a/libavformat/allformats.c +++ b/libavformat/allformats.c @@ -43,9 +43,9 @@ void av_register_rtp_dynamic_payload_handlers(void); */ void av_register_all(void) { - static int inited = 0; + static int inited; - if (inited != 0) + if (inited) return; inited = 1;