From: Stefan Fritsch Date: Fri, 10 Sep 2010 17:00:08 +0000 (+0000) Subject: readability fix, as suggested by Ruediger Pluem X-Git-Tag: 2.3.9~504 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fbeadc3cc40fd35c912799901204d81b60e08c5f;p=apache readability fix, as suggested by Ruediger Pluem git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@995870 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/log.c b/server/log.c index e865628183..80b28443fd 100644 --- a/server/log.c +++ b/server/log.c @@ -820,15 +820,12 @@ static void add_log_id(const conn_rec *c, const request_rec *r) } #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) {