The first argument to "adler32_bytes()" is only passed on to

"update_adler32()", and the corresponding argument is a "const unsigned
char *", so that argument can be a "const unsigned char *".

svn path=/trunk/; revision=12877
This commit is contained in:
Guy Harris 2004-12-30 23:56:12 +00:00
parent a0de9d34c7
commit df2c4d7e69
2 changed files with 3 additions and 3 deletions

View File

@ -45,7 +45,7 @@ unsigned long update_adler32(unsigned long adler, const unsigned char *buf, int
}
/*--- adler32 ---------------------------------------------------------------*/
unsigned long adler32_bytes(unsigned char *buf, int len)
unsigned long adler32_bytes(const unsigned char *buf, int len)
{
return update_adler32(1L, buf, len);
}
@ -53,7 +53,7 @@ unsigned long adler32_bytes(unsigned char *buf, int len)
/*--- adler32_str -----------------------------------------------------------*/
unsigned long adler32_str(const char *buf)
{
return update_adler32(1L, (unsigned char*)buf, strlen(buf));
return update_adler32(1L, (const unsigned char*)buf, strlen(buf));
}
/*---------------------------------------------------------------------------*/

View File

@ -31,7 +31,7 @@ extern "C"{
#endif
unsigned long update_adler32(unsigned long adler, const unsigned char *buf, int len);
unsigned long adler32_bytes(unsigned char *buf, int len);
unsigned long adler32_bytes(const unsigned char *buf, int len);
unsigned long adler32_str(const char *buf);
#ifdef __cplusplus