Unregister format says it's already unregistered
[asterisk/asterisk.git] / file.c
diff --git a/file.c b/file.c
index a393005..b55c954 100644 (file)
--- a/file.c
+++ b/file.c
@@ -132,7 +132,7 @@ int ast_format_unregister(const char *name)
        AST_LIST_TRAVERSE_SAFE_END
        AST_LIST_UNLOCK(&formats);
 
-       if (tmp) {
+       if (!res) {
                if (option_verbose > 1)
                        ast_verbose( VERBOSE_PREFIX_2 "Unregistered format %s\n", name);
        } else