Const-correctness: rpmCharCheck() doesn't modify field, make it const
This commit is contained in:
parent
325a9b1ba5
commit
f2039adf6f
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue