>>> On 13.10.17 at 12:23, <george.dun...@citrix.com> wrote: > On 10/13/2017 10:20 AM, Jan Beulich wrote: >>>>> On 13.10.17 at 11:10, <george.dun...@citrix.com> wrote: >>> On 10/13/2017 10:06 AM, Jan Beulich wrote: >>>>>>> On 13.10.17 at 11:00, <george.dun...@citrix.com> wrote: >>>>> --- a/tools/fuzz/x86_instruction_emulator/afl-harness.c >>>>> +++ b/tools/fuzz/x86_instruction_emulator/afl-harness.c >>>>> @@ -99,13 +99,17 @@ int main(int argc, char **argv) >>>>> exit(-1); >>>>> } >>>>> >>>>> - if ( !feof(fp) ) >>>>> + /* Only run the test if the input file was smaller than >>>>> INPUT_SIZE */ >>>>> + if ( feof(fp) ) >>>>> + { >>>>> + LLVMFuzzerTestOneInput(input, size); >>>>> + } >>>> >>>> ... ideally with the unnecessary braces dropped here >>>> Reviewed-by: Jan Beulich <jbeul...@suse.com> >>> >>> Do you really want this to look like this? >>> >>> if ( ... ) >>> foo(); >>> else >>> { >>> ... >>> } >> >> Yes. It's Linux and qemu who dislike non-matched if/else bodies, >> but our ./CODING_STYLE only says >> >> "Braces should be omitted for blocks with a single statement. e.g., >> >> if ( condition ) >> single_statement();" >> >> and personally I'm happy that it doesn't say anything more. > > Hmm, I personally think it's ugly enough that I'd rather restructure the > code to avoid it looking like that. :-) > > I'll see what I can do.
Well, assuming you would think that way I've intentionally said "ideally", i.e. if you really don't want to change it, I can live with the braces. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel