From 90fad10039adac453d8b5f8bba7faf594a43d206 Mon Sep 17 00:00:00 2001 From: Alexander Vdolainen Date: Sat, 30 Jan 2016 06:37:59 +0200 Subject: [PATCH] minor fixes; --- examples/filelistc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/filelistc.c b/examples/filelistc.c index 0a7bd5d..88689f7 100644 --- a/examples/filelistc.c +++ b/examples/filelistc.c @@ -138,10 +138,10 @@ static int __remote_ls(FILE *fso, struct _remote_host *rh, const char *opts) /* ok determine the lenght */ remote_rpc_len = strlen("dir-open") + 12*sizeof(char) + - (opts ? strlen ("./") : strlen(opts)); + (opts ? strlen (opts) : strlen("./")); if(!(remote_rpc = malloc(remote_rpc_len))) return ENOMEM; else remote_rpc_len = snprintf(remote_rpc, remote_rpc_len, - "(dir-open \"%s\")", opts ? "./" : opts); + "(dir-open \"%s\")", opts ? opts : "./"); /* firstly open the required channel with required type */ if(!(rpc_channel = sxchannel_open(rh->link, READONLY_CHANNEL))) {