Const-correctness: rpmCharCheck() doesn't modify field, make it const

This commit is contained in:
Panu Matilainen 2010-10-29 20:30:07 +03:00
parent 325a9b1ba5
commit f2039adf6f
2 changed files with 3 additions and 3 deletions

View File

@ -600,9 +600,9 @@ if (multiToken) { \
* @param whitelist string of permitted characters
* @return RPMRC_OK if OK
*/
rpmRC rpmCharCheck(rpmSpec spec, char *field, size_t fsize, const char *whitelist)
rpmRC rpmCharCheck(rpmSpec spec, const char *field, size_t fsize, const char *whitelist)
{
char *ch, *stop = &field[fsize];
const char *ch, *stop = &field[fsize];
for (ch=field; *ch && ch < stop; ch++) {
if (risalnum(*ch) || strchr(whitelist, *ch)) continue;

View File

@ -263,7 +263,7 @@ int parseScript(rpmSpec spec, int parsePart);
* @return RPMRC_OK if OK
*/
RPM_GNUC_INTERNAL
rpmRC rpmCharCheck(rpmSpec spec, char *field, size_t fsize, const char *whitelist);
rpmRC rpmCharCheck(rpmSpec spec, const char *field, size_t fsize, const char *whitelist);
/** \ingroup rpmbuild
* Parse dependency relations from spec file and/or autogenerated output buffer.