Can't say if this was the motivation here, but some people like to put
constants before variables for comparisons so as to easily catch the
difference between
if (a = 5) ...
and
if (5 = a) ..
when you really meant if (a == 5).



2014-05-08 0:13 GMT+02:00 Fritjof Bornebusch <frit...@alokat.org>:

> Hi tech,
>
> I think "labels >= 3" is more readable than "3 <= labels".
>
> fritjof
>
> Index: merge.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/rcs/merge.c,v
> retrieving revision 1.7
> diff -u -p -r1.7 merge.c
> --- merge.c     23 Jul 2010 21:46:05 -0000      1.7
> +++ merge.c     7 May 2014 22:10:06 -0000
> @@ -62,7 +62,7 @@ merge_main(int argc, char **argv)
>                         flags |= MERGE_EFLAG;
>                         break;
>                 case 'L':
> -                       if (3 <= labels)
> +                       if (labels >= 3)
>                                 errx(D_ERROR, "too many -L options");
>                         label[labels++] = optarg;
>                         break;
>
>


-- 
May the most significant bit of your life be positive.

Reply via email to