diff options
author | Jeff Trawick <trawick@apache.org> | 2013-11-15 21:52:58 +0000 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2013-11-15 21:52:58 +0000 |
commit | a26a8b2c6809ca56982f66824dd21c3eca08cee4 (patch) | |
tree | 096da369d1b56b6acc4150e5f2adeff3d544476b /modules/slotmem | |
parent | 62bb83d16fd84c439b188bdc1a265cb3094f1c14 (diff) | |
download | httpd-a26a8b2c6809ca56982f66824dd21c3eca08cee4.tar.gz |
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
Diffstat (limited to 'modules/slotmem')
-rw-r--r-- | modules/slotmem/mod_slotmem_shm.c | 9 |
1 files changed, 4 insertions, 5 deletions
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); } } |