diff --git a/src/xmppipe.c b/src/xmppipe.c index e6bb196..35b7fc2 100644 --- a/src/xmppipe.c +++ b/src/xmppipe.c @@ -214,9 +214,11 @@ int main(int argc, char **argv) { break; case 'h': - default: usage(state); exit(0); + default: + usage(state); + exit(2); } } @@ -567,10 +569,9 @@ static long long xmppipe_strtonum(xmppipe_state_t *state, const char *nptr, } static void usage(xmppipe_state_t *state) { - (void)fprintf(stderr, "%s %s (using %s mode process restriction)\n", - __progname, XMPPIPE_VERSION, RESTRICT_PROCESS); (void)fprintf( stderr, + "%s %s (using %s mode process restriction)\n" "usage: %s [OPTIONS]\n" " -u, --username XMPP username (aka JID)\n" " -p, --password XMPP password\n" @@ -601,5 +602,5 @@ static void usage(xmppipe_state_t *state) { " --chat use one to one chat\n" " --no-tls-verify disable TLS certificate " "verification\n", - __progname); + __progname, XMPPIPE_VERSION, RESTRICT_PROCESS, __progname); } diff --git a/src/xmppipe.h b/src/xmppipe.h index bb0678a..dd6a0bc 100644 --- a/src/xmppipe.h +++ b/src/xmppipe.h @@ -27,7 +27,7 @@ #include "strtonum.h" #endif -#define XMPPIPE_VERSION "0.14.4" +#define XMPPIPE_VERSION "0.14.5" #define XMPPIPE_RESOURCE "xmppipe" #define XMPPIPE_STREQ(a, b) (strcmp((a), (b)) == 0)