]> granicus.if.org Git - apache/commitdiff
There's only one way for bb to be non-NULL, so these two
authorCliff Woolley <jwoolley@apache.org>
Wed, 22 Aug 2001 22:25:14 +0000 (22:25 +0000)
committerCliff Woolley <jwoolley@apache.org>
Wed, 22 Aug 2001 22:25:14 +0000 (22:25 +0000)
cases can be combined.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90513 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/ssl_engine_io.c

index e35dfb8954b0310a298c27cf65e37177743ada2f..f41b8c1943be95a149cf5df177817094d21c8321 100644 (file)
@@ -150,7 +150,6 @@ static apr_status_t churn_output(SSLFilterRec *ctx)
 {
     ap_filter_t *f = ctx->pOutputFilter;
     apr_pool_t *p = f->c->pool;
-    apr_bucket_brigade *bb = NULL;
 
     if (!ctx->pssl) {
         /* we've been shutdown */
@@ -159,10 +158,9 @@ static apr_status_t churn_output(SSLFilterRec *ctx)
 
     if (BIO_pending(ctx->pbioWrite)) {
         BUF_MEM *bm = BIO_mem(ctx->pbioWrite);
+        apr_bucket_brigade *bb = apr_brigade_create(p);
         apr_bucket *bucket; 
 
-        bb = apr_brigade_create(p);
-
         /*
          * use the BIO memory buffer that has already been allocated,
          * rather than making another copy of it.
@@ -176,15 +174,13 @@ static apr_status_t churn_output(SSLFilterRec *ctx)
         bm->length = 0; /* reset */
 
         APR_BRIGADE_INSERT_TAIL(bb, bucket);
-    }
-    
-    /* XXX: check for errors */
-    if (bb) {
-       apr_bucket *bucket = apr_bucket_flush_create();
 
        /* XXX: it may be possible to not always flush */
-       APR_BRIGADE_INSERT_TAIL(bb, bucket);
-       ap_pass_brigade(f->next, bb);
+        bucket = apr_bucket_flush_create();
+        APR_BRIGADE_INSERT_TAIL(bb, bucket);
+
+        /* XXX: check for errors */
+        ap_pass_brigade(f->next, bb);
     }
 
     return APR_SUCCESS;