in reply to CLI and problems
That way, if it fails you can print your error and return to the while loop immediately.
For that matter, you could have getParam() itself print warnings on error, put it in the while loop, and not even call execCommand() if it fails.
On a side-note, if 0 is always a failure, you can replace your if statements with:
&getParam() or return 0;
That's nicer to look at IMO, but TIMTOWDI and YMMV. :)
- Matt Riffle
Sr. Systems Programmer, pair Networks, Inc.
(although, I'm speaking only for myself; code is untested unless otherwise stated)
|
|---|