[Libguestfs] [PATCH 1/2] c: NFC Remove redundant parentheses

Matthew Booth mbooth at redhat.com
Tue Jan 17 14:02:29 UTC 2012


On 01/17/2012 02:01 PM, Richard W.M. Jones wrote:
> On Tue, Jan 17, 2012 at 01:48:47PM +0000, Matthew Booth wrote:
>> ---
>>   generator/generator_c.ml |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/generator/generator_c.ml b/generator/generator_c.ml
>> index 4324ec0..9cfb2b7 100644
>> --- a/generator/generator_c.ml
>> +++ b/generator/generator_c.ml
>> @@ -1187,7 +1187,7 @@ trace_send_line (guestfs_h *g)
>>               let n = name_of_optargt argt in
>>               let uc_shortname = String.uppercase shortname in
>>               let uc_n = String.uppercase n in
>> -            pr "  if ((optargs->bitmask&  GUESTFS_%s_%s_BITMASK))\n"
>> +            pr "  if (optargs->bitmask&  GUESTFS_%s_%s_BITMASK)\n"
>>                 uc_shortname uc_n;
>>               (match argt with
>>                | OBool n
>
> NACK.  I believe this avoids a gcc warning where it's complaining
> that you've "mistakenly" written if (a&  b) instead of if (a&&  b).
>
> Rich.
>

I didn't see that warning. Are you sure it's still around?

Matt
-- 
Matthew Booth, RHCA, RHCSS
Red Hat Engineering, Virtualisation Team

GPG ID:  D33C3490
GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490




More information about the Libguestfs mailing list