From: Jeff Trawick <trawick@apache.org>
Date: Fri, 15 Nov 2013 21:52:58 +0000 (+0000)
Subject: Follow-up to r1540161:
X-Git-Tag: 2.5.0-alpha~4858
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a26a8b2c6809ca56982f66824dd21c3eca08cee4;p=apache

Follow-up to r1540161:

The last arg to apr_file_write_full() isn't needed
unless you need to know the number of bytes written before
an error occurred.


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

diff --git a/modules/slotmem/mod_slotmem_shm.c b/modules/slotmem/mod_slotmem_shm.c
index f12b033229..1f7e557cd9 100644
--- a/modules/slotmem/mod_slotmem_shm.c
+++ b/modules/slotmem/mod_slotmem_shm.c
@@ -179,7 +179,6 @@ static void store_slotmem(ap_slotmem_instance_t *slotmem)
     apr_size_t nbytes;
     const char *storename;
     unsigned char digest[APR_MD5_DIGESTSIZE];
-    apr_size_t written = 0;
 
     storename = slotmem_filename(slotmem->gpool, slotmem->name, 1);
 
@@ -203,12 +202,12 @@ static void store_slotmem(ap_slotmem_instance_t *slotmem)
         nbytes = (slotmem->desc.size * slotmem->desc.num) +
                  (slotmem->desc.num * sizeof(char)) + AP_UNSIGNEDINT_OFFSET;
         apr_md5(digest, slotmem->persist, nbytes);
-        rv = apr_file_write_full(fp, slotmem->persist, nbytes, &written);
-        if (rv == APR_SUCCESS && written == nbytes) {
-            rv = apr_file_write_full(fp, digest, APR_MD5_DIGESTSIZE, &written);
+        rv = apr_file_write_full(fp, slotmem->persist, nbytes, NULL);
+        if (rv == APR_SUCCESS) {
+            rv = apr_file_write_full(fp, digest, APR_MD5_DIGESTSIZE, NULL);
         }
         apr_file_close(fp);
-        if (rv != APR_SUCCESS || written != APR_MD5_DIGESTSIZE) {
+        if (rv != APR_SUCCESS) {
             apr_file_remove(storename, slotmem->gpool);
         }
     }