Overview
Request 888942 accepted
- Extend reproducible.patch (enforce list context for the return value
of sort because the behaviour of sort in scalar context is undefined)
- Extend reproducible.patch to sort file lists (boo#1041090)
- Created by bmwiedemann
- In state accepted
- Supersedes 885502
Note that using sort as a return value of a function can be harmful. sort in scalar context is undefined, so if you have a sub like this:
sub foo { return sort [@x](https://build.opensuse.org/users/x); } my $num = foo();
and call it in scalar context, you will get back undef and not the number of elements. In the case of this patch I don't know if the function find_file is called in scalar context anywhere, I just wanted to note that one should avoid doing a sort on return directly and rather do something like:
[@x](https://build.opensuse.org/users/x) = sort [@x](https://build.opensuse.org/users/x); return [@x](https://build.opensuse.org/users/x);
I don't know how to prevent "at-sign letter" being interpreted as a link to a user, sorry.
I extended the patch to enforce list context: https://build.opensuse.org/request/show/886980
@computersalat, @coolo, @dstoecker, @lrupp, @rjschwei, @smithfarm, @tinita: review reminder
Request History
bmwiedemann created request
- Extend reproducible.patch (enforce list context for the return value
of sort because the behaviour of sort in scalar context is undefined)
- Extend reproducible.patch to sort file lists (boo#1041090)
licensedigger accepted review
ok
bigironman added as a reviewer
Being evaluated by staging project "openSUSE:Backports:SLE-15-SP3:Staging:adi:19"
bigironman accepted review
Picked "openSUSE:Backports:SLE-15-SP3:Staging:adi:19"
lrupp accepted review
ok
bigironman accepted review
Staging Project openSUSE:Backports:SLE-15-SP3:Staging:adi:19 got accepted.
bigironman approved review
Staging Project openSUSE:Backports:SLE-15-SP3:Staging:adi:19 got accepted.
bigironman accepted request
Staging Project openSUSE:Backports:SLE-15-SP3:Staging:adi:19 got accepted.
Friendly review reminder: @coolo @lrupp
@computersalat, @coolo, @dstoecker, @lrupp, @rjschwei, @smithfarm, @tinita: review reminder