Re: [PATCH 1/3] send-email: use return; not return undef; on error codepaths

2013-04-02 Thread Ramkumar Ramachandra
Junio C Hamano wrote: Note that we leave return undef; in validate_address on purpose, even though Perlcritic may complain. The primary return site of the function returns whatever is in the scaler variable $address, so it is pointless to change only the other return undef; to return. The

Re: [PATCH 1/3] send-email: use return; not return undef; on error codepaths

2013-04-02 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes: Junio C Hamano wrote: Note that we leave return undef; in validate_address on purpose, even though Perlcritic may complain. The primary return site of the function returns whatever is in the scaler variable $address, so it is pointless to

[PATCH 1/3] send-email: use return; not return undef; on error codepaths

2013-03-31 Thread Junio C Hamano
From: Ramkumar Ramachandra artag...@gmail.com All the callers of ask, extract_valid_address, and validate_patch subroutines assign the return values from them to a single scaler: $var = subr(...); and return undef; in these subroutine can safely be turned into a simpler return;. Doing

Re: [PATCH 1/3] send-email: use return; not return undef; on error codepaths

2013-03-31 Thread Eric Sunshine
On Sun, Mar 31, 2013 at 9:40 PM, Junio C Hamano gits...@pobox.com wrote: All the callers of ask, extract_valid_address, and validate_patch subroutines assign the return values from them to a single scaler: s/scaler/scalar/g (note the /g) $var = subr(...); and return undef; in