Move all of the fopen() and open() calls to the top of main()
Avoid reusing the 'fd' variable, since it is used read only, then later write only
cap_enter(), and make all except the output FD read/seek only.
allanjude on Jul 29 2016, 5:14 AM.Authored by
Well, the file is already a mix and match of style(9) and non-style(9). My suggestion would be to fix up any code to be properly formatted if you're changing it anyway.
Allan: Thanks for working on this!