[Olsr-dev] [Patch 1/1] Pud: Do not use the variable name strlen
Ferry Huberts
(spam-protected)
Sat Aug 25 12:53:02 CEST 2012
updating nmealib now and seeing you did not update the function comment
parameter, nor the header.
Mind if I go ahead and update it in olsrd myself?
On 25-08-12 12:29, Henning Rogge wrote:
> 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))) {
>
--
Ferry Huberts
More information about the Olsr-dev
mailing list