fix --block handling with invalid paths
The rootdev program was printing the path buffer even when the library
call failed. In that case, the buffer most likely is uninitialized.
Make sure we seed it with a NUL byte so it's always valid.
TEST=`FEATURES=test emerge-link rootdev` passes
Trybot-Ready: Mike Frysinger <firstname.lastname@example.org>
Reviewed-by: Yunlian Jiang <email@example.com>
Commit-Queue: Mike Frysinger <firstname.lastname@example.org>
Tested-by: Mike Frysinger <email@example.com>
1 file changed