Summary
lzma egg uses deprecated null-pointer? procedure
Metadata
- Id: 926f5126f438d5beb3abcc5a7b272cb07f82a470
- Trac id: 839
- Type: defect
- Reporter: sjamaan
- Owner: alaric
- Cc:
- Status: closed
- Component: extensions
- Estimated difficulty: easy
- Resolution: fixed
- Priority: minor
- Milestone:
- Version: 4.7.x
- Changetime: 2016-08-26 17:30:11 UTC
- Created: 2012-05-13 16:54:35 UTC
- Keywords:
Attachments
- 926f5126f438d5beb3abcc5a7b272cb07f82a470/attachments/null-pointer-removal-and-simplification.patch
Description
This was found by Mario's scrutiny/specialization run of Salmonella, see http://parenteses.org/mario/misc/specialize-report/install/lzma.html
Attached is a patch that changes the check for null-pointer? to one for #f; c-pointer never returned null-pointer objects anyway, it has always returned #f for NULL pointers AFAIK so I guess this has always been a bug in this egg. While I was writing the patch I noticed an unneccessary begin inside a let (which always has an implicit begin), so I removed that. Then I saw I had a (let ((x ...)) (and x (let ((y ...)) ...))) pattern, which can be simplified to your favorite macro, and-let*. So here's a patch that does that! :)
PS: I wasn't able to test this because in pkgsrc, archivers/lzmalib conflicts with archivers/xz, which is used by graphics/tiff and www/links-gui; graphics/tiff is of course used by lots and lots of packages like print/ghostscript and even editors/emacs! Perhaps it's an idea to change your egg to use archivers/xz instead? It's clearly the more popular of the LZMA libraries...
Changes and comments
[2012-05-13 16:55:01 UTC] sjamaan attached null-pointer-removal-and-simplification.patch (description=Remove deprecated null-pointer? predicate and simplify code)
[2012-05-13 16:56:04 UTC] sjamaan changed status from new to assigned
[2012-05-13 16:56:04 UTC] sjamaan changed owner from alaricsp to alaric
[2016-08-25 21:02:41 UTC] sjamaan set difficulty to easy
[2016-08-26 17:30:11 UTC] alaric changed status from assigned to closed
[2016-08-26 17:30:11 UTC] alaric set resolution to fixed
[2016-08-26 17:30:11 UTC] alaric wrote:
Applied in SVN r33595.