Fixed addhead.cpp for cppcheck

This commit is contained in:
Takeshi Nakatani 2016-02-07 05:53:56 +00:00
parent c7cf86c2ef
commit 1af7aaeccb

View File

@ -201,10 +201,8 @@ bool AdditionalHeader::AddHeader(headers_t& meta, const char* path) const
if(paddhead->pregex){
// regex
int result;
regmatch_t match; // not use
if(0 == (result = regexec(paddhead->pregex, path, 1, &match, 0))){
if(0 == regexec(paddhead->pregex, path, 1, &match, 0)){
// match -> adding header
meta[paddhead->headkey] = paddhead->headvalue;
break;