]> granicus.if.org Git - php/commitdiff
Added missing return statements
authorGustavo Lopes <glopes@nebm.ist.utl.pt>
Mon, 5 Nov 2012 10:36:00 +0000 (11:36 +0100)
committerGustavo Lopes <glopes@nebm.ist.utl.pt>
Sat, 2 Feb 2013 15:38:06 +0000 (16:38 +0100)
ext/sockets/sendrecvmsg.c

index e47bd46e3834d32ba25b8220d2788e13fa90d147..3405215ef3367cd355518ceeb17662670a66832d 100644 (file)
@@ -918,6 +918,7 @@ static void from_zval_write_iov_array(const zval *arr, char *msghdr_c, ser_conte
 
        if (Z_TYPE_P(arr) != IS_ARRAY) {
                do_from_zval_err(ctx, "%s", "expected an array here");
+               return;
        }
 
        num_elem = zend_hash_num_elements(Z_ARRVAL_P(arr));
@@ -964,6 +965,7 @@ static void from_zval_write_controllen(const zval *elem, char *msghdr_c, ser_con
        from_zval_write_uint32(elem, (char*)&len, ctx);
        if (!ctx->err.has_error && len == 0) {
                do_from_zval_err(ctx, "controllen cannot be 0");
+               return;
        }
        msghdr->msg_control = accounted_emalloc(len, ctx);
        msghdr->msg_controllen = len;