1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-12-08 03:42:12 +03:00

examples: Reformat

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Jakub Jelen
2024-08-09 14:54:10 +02:00
parent a49e0c2a84
commit 029754efb3

View File

@@ -39,8 +39,6 @@
#include <libssh/callbacks.h> #include <libssh/callbacks.h>
#include <libssh/libssh.h> #include <libssh/libssh.h>
#include <libssh/sftp.h>
#include "examples_common.h" #include "examples_common.h"
#define MAXCMD 10 #define MAXCMD 10
@@ -112,8 +110,8 @@ static int opts(int argc, char **argv)
{ {
int i; int i;
while((i = getopt(argc,argv,"T:P:F:")) != -1) { while ((i = getopt(argc, argv, "T:P:F:")) != -1) {
switch(i){ switch (i) {
case 'P': case 'P':
pcap_file = optarg; pcap_file = optarg;
break; break;
@@ -159,16 +157,14 @@ static void cfmakeraw(struct termios *termios_p)
static void do_cleanup(int i) static void do_cleanup(int i)
{ {
/* unused variable */ (void)i;
(void) i;
tcsetattr(0, TCSANOW, &terminal); tcsetattr(0, TCSANOW, &terminal);
} }
static void do_exit(int i) static void do_exit(int i)
{ {
/* unused variable */ (void)i;
(void) i;
do_cleanup(0); do_cleanup(0);
exit(0); exit(0);
@@ -179,7 +175,7 @@ static int signal_delayed = 0;
#ifdef SIGWINCH #ifdef SIGWINCH
static void sigwindowchanged(int i) static void sigwindowchanged(int i)
{ {
(void) i; (void)i;
signal_delayed = 1; signal_delayed = 1;
} }
#endif #endif
@@ -253,7 +249,7 @@ static void shell(ssh_session session)
{ {
ssh_channel channel = NULL; ssh_channel channel = NULL;
struct termios terminal_local; struct termios terminal_local;
int interactive=isatty(0); int interactive = isatty(0);
channel = ssh_channel_new(session); channel = ssh_channel_new(session);
if (channel == NULL) { if (channel == NULL) {