From 07569ed62d0dc57491f81717c3f184429475aa8b Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 13 Aug 2013 18:39:37 +0000 Subject: [PATCH] fcst: Micro-optimize ft_cmd_free() git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4963 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- fcst/ft_cmd.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fcst/ft_cmd.c b/fcst/ft_cmd.c index a5855d9dd..9e6610a1d 100644 --- a/fcst/ft_cmd.c +++ b/fcst/ft_cmd.c @@ -191,13 +191,9 @@ static void ft_cmd_done(struct ft_cmd *fcmd) */ void ft_cmd_free(struct scst_cmd *cmd) { - struct ft_cmd *fcmd; + struct ft_cmd *fcmd = scst_cmd_get_tgt_priv(cmd); - fcmd = scst_cmd_get_tgt_priv(cmd); - if (fcmd) { - scst_cmd_set_tgt_priv(cmd, NULL); - ft_cmd_done(fcmd); - } + ft_cmd_done(fcmd); } /*