diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2016-11-05 15:53:02 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2016-11-05 15:53:20 +0100 |
commit | fa2332354b54fed9fa5dc5b566c6f1777f2d701e (patch) | |
tree | 1de355abc8b9cfce9e0ee1ac7f9a9e3cfd02ae55 /examples | |
parent | e9aebb1198bad4b97af0c2c4f13d2ff3340c3289 (diff) | |
download | libssh-fa2332354b54fed9fa5dc5b566c6f1777f2d701e.tar.gz libssh-fa2332354b54fed9fa5dc5b566c6f1777f2d701e.tar.xz libssh-fa2332354b54fed9fa5dc5b566c6f1777f2d701e.zip |
examples: Reformat usage() function
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/sample.c | 27 |
1 files 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); } |