aboutsummaryrefslogtreecommitdiff
path: root/toys/other/chvt.c
diff options
context:
space:
mode:
authorIsaac Dunham <ibid.ag@gmail.com>2013-08-11 22:00:36 -0500
committerIsaac Dunham <ibid.ag@gmail.com>2013-08-11 22:00:36 -0500
commit9d44ab3f179e0e914abc1d6edc79a22c265baaa9 (patch)
tree9382b244b79de47658b0dab633c9dff594661dfb /toys/other/chvt.c
parent1c8b0090a6529ce35f877973778e7814387c1e3f (diff)
downloadtoybox-9d44ab3f179e0e914abc1d6edc79a22c265baaa9.tar.gz
fdisk: remove goto; inline valid(); merge xprintf() calls; shrink sys_types
sys_types had used char[_PATH_MAX] for 22-char max strings. When this is done 48 times, it nearly doubles the size of toybox. goto should only be used when it is the easiest way to bail out. That does not mean "when we need to fall back to returning a one-liner that asks user input", nor is it suitable for looping: C has while () and do { } while (); for a reason. valid was called once. As such, it belonged inline. print_*menu could probably be inlined, but I did not do this yet in case a table-driven approach works better. This uses C string concatenation to break an overly long message up, while not wasting function calls.
Diffstat (limited to 'toys/other/chvt.c')
0 files changed, 0 insertions, 0 deletions