From: Anthony Minessale Date: Thu, 8 Sep 2011 21:44:57 +0000 (-0500) Subject: fix unlikely failure condition X-Git-Tag: v1.2-rc1~51^2~137 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e6ce02462863bca2b6b48306e8ac12311ddab5a;p=thirdparty%2Ffreeswitch.git fix unlikely failure condition --- diff --git a/src/switch_utils.c b/src/switch_utils.c index 158c5d540f..7d6fc21f55 100644 --- a/src/switch_utils.c +++ b/src/switch_utils.c @@ -654,8 +654,10 @@ SWITCH_DECLARE(switch_bool_t) switch_simple_email(const char *to, } if (write(fd, &out, bytes) != bytes) { rval = -1; - } else + break; + } else { bytes = 0; + } }