Merge branch 'rs/logical-vs-binary-or' into maint
authorJunio C Hamano <gitster@pobox.com>
Fri, 19 Jul 2013 17:42:18 +0000 (10:42 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Jul 2013 17:42:18 +0000 (10:42 -0700)
* rs/logical-vs-binary-or:
use logical OR (||) instead of binary OR (|) in logical context

1  2 
builtin/apply.c
diff --combined builtin/apply.c
index 3979f8bf3de8bc82b1d546f063728094d6ac974b,faf8e3088340ab2787c45b0e105a600fd54e51d3..0e9b631db6db422b1e938d6168b608e0a2ae8618
@@@ -906,7 -906,7 +906,7 @@@ static void parse_traditional_patch(con
                        patch->old_name = name;
                } else {
                        patch->old_name = name;
 -                      patch->new_name = xstrdup(name);
 +                      patch->new_name = null_strdup(name);
                }
        }
        if (!name)
@@@ -3525,7 -3525,7 +3525,7 @@@ static int check_patch(struct patch *pa
                ok_if_exists = 0;
  
        if (new_name &&
-           ((0 < patch->is_new) | (0 < patch->is_rename) | patch->is_copy)) {
+           ((0 < patch->is_new) || patch->is_rename || patch->is_copy)) {
                int err = check_to_create(new_name, ok_if_exists);
  
                if (err && threeway) {