GNU Core Utilities - Bugs: bug #29349, ls.c missing HAVE_NL_LANGINFO check
You are not allowed to post comments on this tracker with your current authentication level.
bug #29349: ls.c missing HAVE_NL_LANGINFO check
Submitter: | Alan Hourihane <alanh> | ||
Submitted: | Fri 26 Mar 2010 02:04:52 PM UTC | ||
Category: | None | Severity: | 3 - Normal |
Item Group: | None | Status: | None |
Privacy: | Public | Assigned to: | None |
Open/Closed: | Open |
Fri 26 Mar 2010 03:54:24 PM UTC, comment #5: |
Alan Hourihane <alanh> |
Fri 26 Mar 2010 03:48:13 PM UTC, comment #4: Huh? Notice that required_mon_width is declared at file scope, with the static modifier. C89 guarantees that it is therefore initialized to 0 at program startup. The comment above its declaration states that 0 means to not use precomputed values, so obviously the intent is that the rest of the file should be able to deal with it being 0. |
Eric Blake <ericb>![]() |
Fri 26 Mar 2010 03:27:46 PM UTC, comment #3: Actually, I think it's just because required_mon_width is never initialized to 0 and it's never set in this case.
|
Alan Hourihane <alanh> |
Fri 26 Mar 2010 03:24:38 PM UTC, comment #2: I've be fine with adding logic to deal with abmon_init returning 0 too.
|
Alan Hourihane <alanh> |
Fri 26 Mar 2010 03:12:58 PM UTC, comment #1: abmon_init is already conditional; it returns 0 if HAVE_NL_LANGINFO is not defined. I think a better patch would be something that unconditionally fixes the logic to deal with abmon_init returning 0 because we can't determine a variable size, rather than adding #ifdefs.
|
Eric Blake <ericb>![]() |
Fri 26 Mar 2010 02:04:52 PM UTC, original submission:
Attached patch. |
Alan Hourihane <alanh> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follows 1 latest change.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2010-03-26 | alanh | Attached File | - | ![]() |
Added month.patch, #20037 |
O.k. But the problem is that when abmon_init returns 0 we get the horrible error message for the case that we don't have HAVE_NL_LANGINFO. And given that abmon_init() already contains this check, we should probably just move the check to around the abmon_init() call as in the attached patch and remove the if/endif in abmon_init() itself.