You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sf...@apache.org on 2010/09/10 19:00:08 UTC
svn commit: r995870 - /httpd/httpd/trunk/server/log.c
Author: sf
Date: Fri Sep 10 17:00:08 2010
New Revision: 995870
URL: http://svn.apache.org/viewvc?rev=995870&view=rev
Log:
readability fix, as suggested by Ruediger Pluem
Modified:
httpd/httpd/trunk/server/log.c
Modified: httpd/httpd/trunk/server/log.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/log.c?rev=995870&r1=995869&r2=995870&view=diff
==============================================================================
--- httpd/httpd/trunk/server/log.c (original)
+++ httpd/httpd/trunk/server/log.c Fri Sep 10 17:00:08 2010
@@ -820,15 +820,12 @@ static void add_log_id(const conn_rec *c
}
#endif
- len = apr_base64_encode_len(sizeof(id));
+ len = apr_base64_encode_len(sizeof(id)); /* includes trailing \0 */
encoded = apr_palloc(r ? r->pool : c->pool, len);
apr_base64_encode(encoded, (char *)&id, sizeof(id));
- /*
- * Only the first 11 chars are significant, the last (12th) char is
- * always '='.
- */
- encoded[11] = '\0';
+ /* Skip the last char, it is always '=' */
+ encoded[len - 2] = '\0';
/* need to cast const away */
if (r) {