Re: [PATCH v5 01/13] bisect--helper: BUG() in cmd_*() on invalid subcommand

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Miriam,

> In cmd_bisect__helper() function, there would be a bug
> if an invalid or no subcommand was passed.return error()
> should be replaced by BUG() in that case.

> Mentored-by: Christian Couder <chriscool@xxxxxxxxxxxxx>
> Mentored-by: Johannes Schindelin <Johannes.Schindelin@xxxxxx>
> Signed-off-by: Miriam Rubio <mirucam@xxxxxxxxx>
> ---

I think we can try for a better message. Maybe something like:

    One encounters a BUG when an invalid or no subcommand is passed to
    'cmd_bisect__helper()'. BUG() out instead of returning an error.

> -		return error("BUG: unknown subcommand '%d'", cmdmode);
> +		BUG("unknown subcommand %d", (int)cmdmode);

Do we need to typecast an integer to an integer here?

Regards,
Shourya Shukla




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux