Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion include/tscore/MatcherUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@
#pragma once

#include "tscore/ParseRules.h"
#include "tscore/Result.h"
#include "tscore/ink_inet.h"
#include "tscore/ink_inet.h"
#include "tscore/ink_platform.h"
Comment on lines 35 to +36

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi

I've fixed this issue include/tscore/MatcherUtils.h and removed the duplicate include of #include "tscore/ink_inet.h". The commit hash is 83959a0.

Regards
Graham


// Look in MatcherUtils.cc for comments on function usage
char *readIntoBuffer(const char *file_path, const char *module_name, int *read_size_ptr);
Expand Down
10 changes: 4 additions & 6 deletions src/tscore/MatcherUtils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,11 @@
*
****************************************************************************/

#include "tscore/ink_platform.h"
#include "tscore/Diags.h"
#include "tscore/ink_memory.h"
#include "tscore/ink_inet.h"
#include "tscore/ink_assert.h"
#include "tscore/MatcherUtils.h"
#include "tscore/Tokenizer.h"
#include "tscore/ink_assert.h"
#include "tscore/ink_memory.h"

// char* readIntoBuffer(const char* file_path, const char* module_name,
// int* read_size_ptr)
Expand Down Expand Up @@ -113,7 +111,7 @@ readIntoBuffer(const char *file_path, const char *module_name, int *read_size_pt
// Didn't get the whole file, drop everything. We don't want to return
// something partially read because, ie. with configs, the behaviour
// is undefined.
Error("%s Only able to read %ld bytes out %ld for %s file", module_name, read_size, file_size, file_path);
Error("%s Only able to read %zd bytes out %zd for %s file", module_name, read_size, file_size, file_path);
ats_free(file_buf);
file_buf = nullptr;
}
Expand Down Expand Up @@ -144,7 +142,7 @@ unescapifyStr(char *buffer)
if (*read == '%' && *(read + 1) != '\0' && *(read + 2) != '\0') {
subStr[0] = *(++read);
subStr[1] = *(++read);
*write = static_cast<char>(strtol(subStr, (char **)nullptr, 16));
*write = static_cast<char>(strtol(subStr, static_cast<char **>(nullptr), 16));
read++;
Comment on lines 142 to 146
write++;
} else if (*read == '+') {
Expand Down