getopt: fix compiler warning

Signed-off-by: Karel Zak <kzak@redhat.com>
getopt: rename function to keep code readable

Signed-off-by: Karel Zak <kzak@redhat.com>