From 8807fa0f2c1086f466c45eefa633165b1034404d Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Mon, 6 Aug 2018 14:40:15 -0600 Subject: [PATCH] fix warning and update comments --- src/wolfscp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wolfscp.c b/src/wolfscp.c index 1a309fe..2fba195 100644 --- a/src/wolfscp.c +++ b/src/wolfscp.c @@ -1046,7 +1046,8 @@ static int GetScpTimestamp(WOLFSSH* ssh, byte* buf, word32 bufSz, } -/* helps with checking if the base path is a directory or file */ +/* helps with checking if the base path is a directory or file + * returns WS_SUCCESS on success */ static int ParseBasePathHelper(WOLFSSH* ssh, int cmdSz) { ScpSendCtx ctx; @@ -1067,7 +1068,7 @@ static int ParseBasePathHelper(WOLFSSH* ssh, int cmdSz) WSTRNCAT(buf, "/..", sizeof("/..")); clean_path(buf); - idx = WSTRLEN(buf) + 1; /* +1 for delimiter */ + idx = (int)WSTRLEN(buf) + 1; /* +1 for delimiter */ if (idx > cmdSz || idx > sz) { return WS_BUFFER_E; }