aboutsummaryrefslogtreecommitdiff
path: root/toys/who.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2012-02-07 22:25:59 -0600
committerRob Landley <rob@landley.net>2012-02-07 22:25:59 -0600
commitf7c1de35882f1f6eddada222efd798f0b66b6dcf (patch)
tree33b51ce5f525648763de62e453cde7a0f991f165 /toys/who.c
parente0bd691bdf3f1ce19dcebfe46d830a0fc408e3d5 (diff)
downloadtoybox-f7c1de35882f1f6eddada222efd798f0b66b6dcf.tar.gz
More cmp.c shrinkage.
Abuse loopfiles() to handle both arguments, caching the first pass in globals. That eliminates get_fd() since loopfiles already knows how to handle "-" arg. Chop toybuf in half and use half for each file, eliminating malloc/free. main() becomes just a call to loopfiles(), which does all open/close.
Diffstat (limited to 'toys/who.c')
0 files changed, 0 insertions, 0 deletions