From 7cd10cbc677e5b800bab04b0c7c9a8662359b6c3 Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 19 Nov 2016 17:17:15 -0500 Subject: pe_impl_strlen_ansi(): code maintenance. --- src/internal/pe_impl.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/internal') diff --git a/src/internal/pe_impl.c b/src/internal/pe_impl.c index c586b63..3edbe16 100644 --- a/src/internal/pe_impl.c +++ b/src/internal/pe_impl.c @@ -10,18 +10,17 @@ int32_t pe_impl_strlen_ansi(const char * str) { - char * ch; - char * upper_bound; + const char * ch; + const char * upper_bound; - /* sanity check */ - upper_bound = (char *)str + PE_STR_MAX_SYMBOL_LEN_ALLOWED; + upper_bound = str + PE_STR_MAX_SYMBOL_LEN_ALLOWED; - for (ch = (char *)str; (ch < upper_bound) && (*ch); ch++); + for (ch=str; *ch && ch