From fa2332354b54fed9fa5dc5b566c6f1777f2d701e Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sat, 5 Nov 2016 15:53:02 +0100 Subject: [PATCH] examples: Reformat usage() function Signed-off-by: Andreas Schneider --- examples/sample.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/examples/sample.c b/examples/sample.c index ee32d5b7..53f7f6c4 100644 --- a/examples/sample.c +++ b/examples/sample.c @@ -76,22 +76,25 @@ static void add_cmd(char *cmd){ cmds[n]=strdup(cmd); } -static void usage(){ - fprintf(stderr,"Usage : ssh [options] [login@]hostname\n" - "sample client - libssh-%s\n" - "Options :\n" - " -l user : log in as user\n" - " -p port : connect to port\n" - " -d : use DSS to verify host public key\n" - " -r : use RSA to verify host public key\n" +static void usage(void) +{ + fprintf(stderr, + "Usage : ssh [options] [login@]hostname\n" + "sample client - libssh-%s\n" + "Options :\n" + " -l user : log in as user\n" + " -p port : connect to port\n" + " -d : use DSS to verify host public key\n" + " -r : use RSA to verify host public key\n" #ifdef WITH_PCAP - " -P file : create a pcap debugging file\n" + " -P file : create a pcap debugging file\n" #endif #ifndef _WIN32 - " -T proxycommand : command to execute as a socket proxy\n" + " -T proxycommand : command to execute as a socket proxy\n" #endif - , - ssh_version(0)); + "\n", + ssh_version(0)); + exit(0); }