[Olsr-dev] [Patch 1/1] Pud: Do not use the variable name strlen

Henning Rogge (spam-protected)
Sat Aug 25 12:29:11 CEST 2012


From: Henning Rogge <(spam-protected)>
Date: Sat, 25 Aug 2012 12:27:35 +0200
Subject: Pud: Do not use the variable name strlen.

---
 lib/pud/nmealib/src/parse.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/pud/nmealib/src/parse.c b/lib/pud/nmealib/src/parse.c
index 5e35d58..4090556 100644
--- a/lib/pud/nmealib/src/parse.c
+++ b/lib/pud/nmealib/src/parse.c
@@ -206,7 +206,7 @@ static bool validateMode(char * c) {
  * - true when the string has invalid characters
  * - false otherwise
  */
-bool nmea_parse_sentence_has_invalid_chars(const char * str, const
size_t strlen, const char * strName, char * report,
+bool nmea_parse_sentence_has_invalid_chars(const char * str, const
size_t str_len, const char * strName, char * report,
                const size_t reportSize) {
        static const char invalidChars[] = { '$', '*', ',', '!', '\\',
'^', '~' };
        static const char * invalidCharsNames[] = { "sentence
delimiter ($)", "checksum field delimiter (*)", "comma (,)
@@ -215,11 +215,11 @@ bool nmea_parse_sentence_has_invalid_chars(const
char * str, const size_t strlen
        size_t i;
        size_t j;

-       if (!str || !strlen) {
+       if (!str || !str_len) {
                return false;
        }

-       for (i = 0; i < strlen; i++) {
+       for (i = 0; i < str_len; i++) {
                char c = str[i];

                if (!((c >= 32) && (c <= 126))) {
-- 
1.7.9.5



-- 
Steven Hawkings about cosmic inflation: "An increase of billions of
billions of percent in a tiny fraction of a second. Of course, that
was before the present government."




More information about the Olsr-dev mailing list