lights_helper: I/O API cleanup
authorChristopher N. Hesse <raymanfx@gmail.com>
Sun, 2 Apr 2017 15:20:16 +0000 (17:20 +0200)
committerChristopher N. Hesse <raymanfx@gmail.com>
Sun, 2 Apr 2017 15:27:58 +0000 (17:27 +0200)
commit235c2987671222299042c7d920f83e21c7632ebb
tree8b7c4243850d8fb0f28700096490263cea3f59e1
parentd483dd7898a67ab30a424f20eb17e0f748cac12d
lights_helper: I/O API cleanup

 * buf => buffer for consistency
 * explicitly cast strtol retval to int
 * close(NULL) is a no-op, remove superfluous checking
 * replace variying buffer sizes by INT_MAX_STRLEN
 * always return signed errno codes

Change-Id: I972e33e2435ec7d68a8ffdc5ab88a14d8005ff55
liblights/lights_helper.c