From: Arjan van de Ven <arjan at linux.intel.com>
To: powertop@lists.01.org
Subject: Re: [Powertop] [PATCH 1/2] Updates to support Android platform
Date: Tue, 18 Sep 2012 06:26:37 -0700 [thread overview]
Message-ID: <5058768D.1090701@linux.intel.com> (raw)
In-Reply-To: CA+Z25wVQO-a7Rqjh+XA0iAb04sNoRE8bd2H0UBXtjjrM-b5KuA@mail.gmail.com
[-- Attachment #1: Type: text/plain, Size: 1588 bytes --]
On 9/17/2012 10:53 PM, Rajagopal Venkat wrote:
> On 18 September 2012 10:53, Magnus Fromreide <magfr(a)lysator.liu.se> wrote:
>> On Tue, 2012-09-18 at 09:54 +0530, Rajagopal Venkat wrote:
>>> On 17 September 2012 21:58, Chris Ferron <chris.e.ferron(a)linux.intel.com> wrote:
>>>> On 09/17/2012 07:34 AM, Rajagopal Venkat wrote:
>>>>>
>>>>> #include "devices/device.h"
>>>>> diff --git a/src/process/do_process.cpp b/src/process/do_process.cpp
>>>>> index eaef7f1..c9d6b0b 100644
>>>>> --- a/src/process/do_process.cpp
>>>>> +++ b/src/process/do_process.cpp
>>>>> @@ -869,7 +869,7 @@ void process_update_display(void)
>>>>> if (!show_power)
>>>>> strcpy(power, " ");
>>>>> sprintf(name, "%s", all_power[i]->type());
>>>>> - while (mbstowcs(NULL,name,0) < 14) strcat(name, " ");
>>>>> + while (mbstowcs(NULL,name,20) < 14) strcat(name, " ");
>>>>>
>>>>
>>>> mbstowcs(NULL,name,0) is a test. return will be count. while catches the
>>>> error.
>>>
>>> Agree. The Android bionic libc version of mbstowcs always returns zero if
>>> max(third parameter) is zero, resulting in infinite loop.
>>
>> Have you reported the bug in the library to Google? If the first
>> argument is NULL posix says the third argument should be ignored.
>
> I don't see bionic libc claiming to be posix compliant.
can you make a small wrapper in your android compat header to cope with this case?
(in the idea of keeping all the junk to work around a buggy platform in one place)
next reply other threads:[~2012-09-18 13:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-18 13:26 Arjan van de Ven [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-09-24 12:22 [Powertop] [PATCH 1/2] Updates to support Android platform Rajagopal Venkat
2012-09-18 8:11 Sergey Senozhatsky
2012-09-18 5:58 Rajagopal Venkat
2012-09-18 5:53 Rajagopal Venkat
2012-09-18 5:43 Magnus Fromreide
2012-09-18 5:23 Magnus Fromreide
2012-09-18 4:24 Rajagopal Venkat
2012-09-18 3:50 Rajagopal Venkat
2012-09-17 16:28 Chris Ferron
2012-09-17 15:59 Arjan van de Ven
2012-09-17 14:54 Sergey Senozhatsky
2012-09-17 14:34 Rajagopal Venkat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5058768D.1090701@linux.intel.com \
--to=powertop@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.