Re: remove duplicate code and not needed break statement

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

 



Hi Erik,

Erik Faye-Lund wrote:
> On Sun, Jul 18, 2010 at 7:49 PM, Ralf Thielow

>>                case 'D': /* we used to emit D but that was misguided. */
>> -                       goto out_stale;
>> -                       break;
>>                case 'T': /* we used to emit T but nobody uses it. */
>
> We have a tendency of adding a comment pointing out fall through
> between case-statements. Perhaps you should add one?

I think in this case that would not be appropriate.  It is the
difference between:

	case 1:
	case 2:
	case 3:
		puts("one to three");
		break;

and

	case 1:
		puts("one");
		/* fall through */
	case 2:
	case 3:
		puts("one to three");
		break;

I admit, I am surprised to see multiple suggestions for improvements
to details of the patch.  I guess I should say, except for the log
message, it is

  Reviewed-by: Jonathan Nieder <jrnieder@xxxxxxxxx>

i.e., I don’t see any low-hanging fruit for improving it without
actually taking a deeper look at the surrounding code.  Ralf, can we
have your sign-off?  That way maybe it could be applied and people
could suggest patches on top.

Still, thanks for looking it over.

Jonathan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]