Simplify a small bit of logic.
authorRussell Bryant <russell@russellbryant.com>
Mon, 12 Feb 2007 15:40:23 +0000 (15:40 +0000)
committerRussell Bryant <russell@russellbryant.com>
Mon, 12 Feb 2007 15:40:23 +0000 (15:40 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54003 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/channel.c

index 1a8cfab..b02178d 100644 (file)
@@ -2673,10 +2673,7 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr)
                        /* and now put it through the regular translator */
                        f = (chan->writetrans) ? ast_translate(chan->writetrans, f, 0) : f;
                }
                        /* and now put it through the regular translator */
                        f = (chan->writetrans) ? ast_translate(chan->writetrans, f, 0) : f;
                }
-               if (f)
-                       res = chan->tech->write(chan, f);
-               else
-                       res = 0;
+               res = f ? chan->tech->write(chan, f) : 0;
                break;
        case AST_FRAME_NULL:
        case AST_FRAME_IAX:
                break;
        case AST_FRAME_NULL:
        case AST_FRAME_IAX: