aboutgitcodebugslistschat
path: root/tcp.h
diff options
context:
space:
mode:
authorLaine Stump <laine@redhat.com>2023-02-15 03:24:32 -0500
committerStefano Brivio <sbrivio@redhat.com>2023-02-16 17:32:10 +0100
commitb20fe11b3615e26253e06aec9c15a600071dc6d4 (patch)
treec11526ef2fd1e7fc04b80da9f0896555faf83229 /tcp.h
parentc864c6004715ce77d938c968274915b2ef481caa (diff)
downloadpasst-b20fe11b3615e26253e06aec9c15a600071dc6d4.tar
passt-b20fe11b3615e26253e06aec9c15a600071dc6d4.tar.gz
passt-b20fe11b3615e26253e06aec9c15a600071dc6d4.tar.bz2
passt-b20fe11b3615e26253e06aec9c15a600071dc6d4.tar.lz
passt-b20fe11b3615e26253e06aec9c15a600071dc6d4.tar.xz
passt-b20fe11b3615e26253e06aec9c15a600071dc6d4.tar.zst
passt-b20fe11b3615e26253e06aec9c15a600071dc6d4.zip
make conf_ports() exit immediately after logging error
Rather than having conf_ports() (possibly) log an error, and then letting the caller log the entire usage() message and exit, just log the errors and exit immediately (using die()). For some errors, conf_ports would previously not log any specific message, leaving it up to the user to determine the problem by guessing. We replace all of those silent returns with die() (logging a specific error), thus permitting us to make conf_ports() return void, which simplifies the caller. While modifying the two callers to conf_ports() to not check for a return value, we can further simplify the code by removing the check for a non-null optarg, as that is guaranteed to never happen (due to prior calls to getopt_long() with "argument required" for all relevant options - getopt_long() would have already caught this error). Signed-off-by: Laine Stump <laine@redhat.com> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp.h')
0 files changed, 0 insertions, 0 deletions