httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "pqf" <...@mailtech.cn>
Subject Re: Pull request: server/util_md5.c:58 - replace magic number with constant arithmetic
Date Wed, 29 Aug 2012 10:14:47 GMT
Some C compilers don't support this: result[2*APR_MD5_DIGESTSIZE+1] ?



Hello, dev@. 

I request a little change to HTTPD code. 

On line 58 of server/util_md5.c, please replace 

char  *r,  result[33];  /* (MD5_DIGESTSIZE * 2) + 1 */ 

with 

char  *r,  result[2*APR_MD5_DIGESTSIZE+1]; 

There's only constant arithmetic here, so I don't see a reason to  
pre-calculate the size here, and other code files use  
2*APR_MD5_DIGESTSIZE+1 often. 

Thanks, 
SiPlus 
Mime
View raw message