]> Sergey Matveev's repositories - public-inbox.git/commit
hval: to_filename: return `undef' instead of empty string
authorEric Wong <e@yhbt.net>
Tue, 7 Jul 2020 20:37:35 +0000 (20:37 +0000)
committerEric Wong <e@yhbt.net>
Fri, 10 Jul 2020 11:27:06 +0000 (11:27 +0000)
commit7f454bace0442cd5ce22068ec1e098e964d82778
tree1a3ba0012aa75a3a8a427a275c2b46ffce60813b
parentbc18c05b1681acc9a468b298c34b12ca4db3e5bb
hval: to_filename: return `undef' instead of empty string

Returning an empty string for a filename makes no sense,
so instead return `undef' so the caller can setup a fallback
using the "//" operator.

This fixes uninitialized variable warnings because split()
on an empty string returns `undef', which caused to_filename
to warn on s// and tr// ops.
lib/PublicInbox/Hval.pm
lib/PublicInbox/Mbox.pm
lib/PublicInbox/MboxGz.pm
t/hval.t