This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug locale/22338] locale: Use the right type for allocation sizes (non-portable assumptions).
- From: "carlos at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 23 Oct 2017 20:49:36 +0000
- Subject: [Bug locale/22338] locale: Use the right type for allocation sizes (non-portable assumptions).
- Auto-submitted: auto-generated
- References: <bug-22338-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=22338
--- Comment #2 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Andreas Schwab from comment #1)
> > The oringal code is fine, but it's a non-portable assumption to say that
> > sizeof (foo **) == sizeof (foo *), it could in theory be different.
>
> Not in GNU C.
OK, in which case there are only 2 other good reasons for changing it:
* some static analysis tooling doesn't know about GNU C and could warn (I've
seen this in coverity).
* it is logically clearer that the size needed is "element size x number of
elements"
Would you object to this kind of change?
--
You are receiving this mail because:
You are on the CC list for the bug.