lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAF2d9jg_A0vyt_rOmDmA9_tkMB7mnJArCkVUYO6Fdy7y0K88rg@mail.gmail.com>
Date:   Mon, 20 Aug 2018 17:32:36 -0700
From:   Mahesh Bandewar (महेश बंडेवार) 
        <maheshb@...gle.com>
To:     Stephen Hemminger <stephen@...workplumber.org>
Cc:     Mahesh Bandewar <mahesh@...dewar.net>,
        netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH iproute2] iproute: make clang happy

On Mon, Aug 20, 2018 at 3:50 PM, Stephen Hemminger
<stephen@...workplumber.org> wrote:
> On Mon, 20 Aug 2018 14:42:15 -0700
> Mahesh Bandewar <mahesh@...dewar.net> wrote:
>
>>
>>               if (is_json_context()) {
>> +                     json_writer_t *jw;
>> +
>>                       open_json_object("bittiming");
>>                       print_int(PRINT_ANY, "bitrate", NULL, bt->bitrate);
>> -                     jsonw_float_field_fmt(get_json_writer(),
>> -                                           "sample_point", "%.3f",
>> -                                           (float) bt->sample_point / 1000.);
>> +                     jw = get_json_writer();
>> +                     jsonw_name(jw, "sample_point");
>> +                     jsonw_printf(jw, "%.3f",
>> +                                  (float) bt->sample_point / 1000);
>
> I think it would be better to get rid of the is_json_context() here in  the CAN code
> and just use the print_json functions completely.  Most of the other code is able to
> do that already.
Seems like this is not the only location and need to be taken care
every where in the CAN code. I'll leave it to some JSON / print expert

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ