Merge "rtp_engine: Skip useless self-assignment in ast_rtp_engine_unload_format."
authorJoshua Colp <jcolp@digium.com>
Thu, 2 Jul 2015 12:52:41 +0000 (07:52 -0500)
committerGerrit Code Review <gerrit2@gerrit.digium.api>
Thu, 2 Jul 2015 12:52:41 +0000 (07:52 -0500)
main/rtp_engine.c

index 88d2db3..6ae8faf 100644 (file)
@@ -1798,7 +1798,9 @@ int ast_rtp_engine_unload_format(struct ast_format *format)
                        rtp_engine_mime_type_cleanup(x);
                        continue;
                }
-               ast_rtp_mime_types[y] = ast_rtp_mime_types[x];
+               if (x != y) {
+                       ast_rtp_mime_types[y] = ast_rtp_mime_types[x];
+               }
                y++;
        }
        mime_types_len = y;