From b6a0896ce64264ad903907348285c53b6e7c2c4b Mon Sep 17 00:00:00 2001 From: Edoardo Prezioso Date: Thu, 26 Jan 2012 11:49:08 +0100 Subject: [PATCH] Change 'simplifyReturn' to 'simplifyReturnStrncat' because it's not clear what this function does. --- lib/tokenize.cpp | 4 ++-- lib/tokenize.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 673c68d4a..8911e6d9f 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -3784,7 +3784,7 @@ bool Tokenizer::simplifyTokenList() } } - simplifyReturn(); + simplifyReturnStrncat(); removeRedundantAssignment(); @@ -9112,7 +9112,7 @@ void Tokenizer::unnecessaryQualificationError(const Token *tok, const std::strin Check::reportError(errmsg); } -void Tokenizer::simplifyReturn() +void Tokenizer::simplifyReturnStrncat() { for (Token *tok = _tokens; tok; tok = tok->next()) { if (Token::Match(tok, "return strncat ( %any% , %any% , %any% ) ;")) { diff --git a/lib/tokenize.h b/lib/tokenize.h index 815f226a1..ddb483651 100644 --- a/lib/tokenize.h +++ b/lib/tokenize.h @@ -723,7 +723,7 @@ public: * Simplify e.g. 'return(strncat(temp,"a",1));' into * strncat(temp,"a",1); return temp; */ - void simplifyReturn(); + void simplifyReturnStrncat(); /** * Output list of unknown types.