From 5c3a119d9155a879edab7617b95d3516fb0c2a13 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Mar 2006 23:18:48 -0600 Subject: [PATCH] Bug #17720 Minor cleanup from Mikael's review sql/ha_partition.cc: minor cleanup of code, returning inside the first if clause and then calling loop_extra if the if clause is not executed. --- sql/ha_partition.cc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 059cc997e55..21ad0aa6a2c 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -4820,15 +4820,11 @@ int ha_partition::prepare_for_delete() result= tmp; for (file= m_reorged_file; *file; file++) if ((tmp= (*file)->extra(HA_EXTRA_PREPARE_FOR_DELETE))) - result= tmp; + result= tmp; + DBUG_RETURN(result); } - else - { - for (file= m_file; *file; file++) - if ((tmp= (*file)->extra(HA_EXTRA_PREPARE_FOR_DELETE))) - result= tmp; - } - DBUG_RETURN(result); + + DBUG_RETURN(loop_extra(HA_EXTRA_PREPARE_FOR_DELETE)); } /*