|
From: Bernhard R. L. <br...@de...> - 2009-03-24 17:12:11
|
Read_pid is never called unless with 3rd and 4th argument 0. Also most users have the exactly same call pattern, so moving that into a new function make the other functions a bit easier to read. (Especially as I am trying to change some connection handling, where using the same fd variable for different things in the same function tends to be a bit confusing.) Only non-triviality is that some code had pid = -1 per default, other = 0. This patch should contain everything to cope with that. common/getqueue.c | 35 ++++++++++++++++++++++------------- common/lpd.c | 8 +------- common/lpd_control.c | 15 +++++---------- common/lpd_dispatch.c | 8 ++------ common/lpd_jobs.c | 2 +- common/lpd_remove.c | 9 ++------- common/lpd_status.c | 18 +++++------------- include/getqueue.h | 3 ++- 8 files changed, 40 insertions(+), 58 deletions(-) Hochachtungsvoll, Bernhard R. Link |