tweak: add missing return to fix double close(…) on file descriptor…

… and avoid printing conflicting messages.
This commit is contained in:
Igor Böhm 2021-10-06 13:37:39 +00:00 committed by Ori Bernstein
parent a13c5c3dda
commit 659496081e

View file

@ -1731,6 +1731,7 @@ twrite(Thing *t)
if(writeimage(fd, t->b, 0)<0 || (t->s && writesubfont(fd, t->s)<0)){
close(fd);
mesg("can't write %s: %r", t->name);
return;
}
t->mod = 0;
close(fd);