This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[review v5] localedef: Add verbose messages for failure paths.


Adhemerval Zanella has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/glibc/+/303
......................................................................


Patch Set 5: Code-Review+2

(1 comment)

| --- locale/programs/localedef.c
| +++ locale/programs/localedef.c
| @@ -601,3 +591,16 @@ normalize_codeset (const char *codeset, size_t name_len)
| -    }
| -
| -  return (const char *) retval;
| +  /* If there were only digits we assume it's an ISO standard and we will
| +     prefix with 'iso' so include space for that.  */
| +  wp = retval = xasprintf ("%s%.*s", only_digit ? "iso" : "", len, "");
| +
| +  /* Skip "iso".  */
| +  if (only_digit)
| +    wp += 3;

PS5, Line 597:

Ok.

| +
| +  /* Lowercase all characters. */
| +  for (cnt = 0; cnt < name_len; ++cnt)
| +    if (isalpha (codeset[cnt]))
| +      *wp++ = tolower (codeset[cnt]);
| +    else if (isdigit (codeset[cnt]))
| +      *wp++ = codeset[cnt];
| +
| +  /* Return allocated and converted name for caller to free.  */

-- 
Gerrit-Project: glibc
Gerrit-Branch: master
Gerrit-Change-Id: I28b9f680711ff00252a2cb15625b774cc58ecb9d
Gerrit-Change-Number: 303
Gerrit-PatchSet: 5
Gerrit-Owner: Carlos O'Donell <carlos@redhat.com>
Gerrit-Reviewer: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Gerrit-Reviewer: Carlos O'Donell <carlos@redhat.com>
Gerrit-Reviewer: Florian Weimer <fweimer@redhat.com>
Gerrit-CC: Simon Marchi <simon.marchi@polymtl.ca>
Gerrit-Comment-Date: Tue, 17 Dec 2019 12:27:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]