Guillem Jover: > I've not applied thie one, because the format that requires that call > is 2.x not 0.x, it assumes possible future formats might need that > same call which is less maintenable and I don't find switching the > check more clear.
After the refatoring, the code read:
if (deb_format.major == 0) {
gzfd = arfd;
} else {
gzfd = setup_temp_gz(_("data member"));
}
create_data_tar(dir, gzfd);
if (deb_format.major == 2) {
write_data_tar(debar, arfd, gzfd);
}
With such control flow, what happens when deb_format.major neither 0
nor 2? I understand the gzfd is opened as a temporary file, but then
never written to the .deb.
> What I've done instead is make the other format 2 code branches check
> for the major == 2 so that it should be more clear, and I'm guessing
> that's what might have confused you?
If that fixes the previously described behaviour, it's all good. :)
--
Lunar .''`.
[email protected] : :Ⓐ : # apt-get install anarchism
`. `'`
`-
signature.asc
Description: Digital signature

