From 42a523a49190abb0ba48d7b24caf1037103408d5 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 21 Sep 2010 13:14:20 +0300 Subject: [PATCH] strstr() considered harmful, part 541 - buf isn't const here, it's modified through pointer acquired through strstr() which silently casts away the const. --- build/files.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build/files.c b/build/files.c index 52b114b..d16b0eb 100644 --- a/build/files.c +++ b/build/files.c @@ -259,7 +259,7 @@ static VFA_t const verifyAttrs[] = { * @param fl package file tree walk data * @return RPMRC_OK on success */ -static rpmRC parseForVerify(const char * buf, FileList fl) +static rpmRC parseForVerify(char * buf, FileList fl) { char *p, *pe, *q = NULL; const char *name; @@ -356,7 +356,7 @@ exit: * @param fl package file tree walk data * @return RPMRC_OK on success */ -static rpmRC parseForDev(const char * buf, FileList fl) +static rpmRC parseForDev(char * buf, FileList fl) { const char * name; const char * errstr = NULL; @@ -452,7 +452,7 @@ exit: * @param fl package file tree walk data * @return 0 on success */ -static rpmRC parseForAttr(const char * buf, FileList fl) +static rpmRC parseForAttr(char * buf, FileList fl) { const char *name; char *p, *pe, *q = NULL; @@ -606,7 +606,7 @@ exit: * @param fl package file tree walk data * @return RPMRC_OK on success */ -static rpmRC parseForConfig(const char * buf, FileList fl) +static rpmRC parseForConfig(char * buf, FileList fl) { char *p, *pe, *q = NULL; const char *name; @@ -681,7 +681,7 @@ static int langCmp(const void * ap, const void * bp) * @param fl package file tree walk data * @return RPMRC_OK on success */ -static rpmRC parseForLang(const char * buf, FileList fl) +static rpmRC parseForLang(char * buf, FileList fl) { char *p, *pe, *q = NULL; const char *name; @@ -774,7 +774,7 @@ exit: * @param fl package file tree walk data * @return RPMRC_OK on success */ -static rpmRC parseForCaps(const char * buf, FileList fl) +static rpmRC parseForCaps(char * buf, FileList fl) { char *p, *pe, *q = NULL; const char *name; -- 2.7.4