mirror of https://github.com/wolfSSL/wolfssh.git
Typecast some strlen return values to the type they are assigned to.
parent
9e16f6ec71
commit
6d8e55eb8c
|
@ -7358,9 +7358,9 @@ void clean_path(char* path)
|
||||||
if (path != NULL) {
|
if (path != NULL) {
|
||||||
/* go through path until no cases are found */
|
/* go through path until no cases are found */
|
||||||
do {
|
do {
|
||||||
sz = WSTRLEN(path);
|
|
||||||
int prIdx = 0; /* begin of cut */
|
int prIdx = 0; /* begin of cut */
|
||||||
int enIdx = 0; /* end of cut */
|
int enIdx = 0; /* end of cut */
|
||||||
|
sz = (long)WSTRLEN(path);
|
||||||
|
|
||||||
found = 0;
|
found = 0;
|
||||||
for (i = 1; i < sz; i++) {
|
for (i = 1; i < sz; i++) {
|
||||||
|
@ -7401,7 +7401,7 @@ void clean_path(char* path)
|
||||||
} while (found);
|
} while (found);
|
||||||
|
|
||||||
#if defined(WOLFSSL_NUCLEUS) || defined(USE_WINDOWS_API)
|
#if defined(WOLFSSL_NUCLEUS) || defined(USE_WINDOWS_API)
|
||||||
sz = WSTRLEN(path);
|
sz = (long)WSTRLEN(path);
|
||||||
|
|
||||||
if (path[sz - 1] == ':') {
|
if (path[sz - 1] == ':') {
|
||||||
path[sz] = WS_DELIM;
|
path[sz] = WS_DELIM;
|
||||||
|
@ -7411,7 +7411,7 @@ void clean_path(char* path)
|
||||||
/* clean up any multiple drive listed i.e. A:/A: */
|
/* clean up any multiple drive listed i.e. A:/A: */
|
||||||
{
|
{
|
||||||
int i,j;
|
int i,j;
|
||||||
sz = WSTRLEN(path);
|
sz = (long)WSTRLEN(path);
|
||||||
for (i = 0, j = 0; i < sz; i++) {
|
for (i = 0, j = 0; i < sz; i++) {
|
||||||
if (path[i] == ':') {
|
if (path[i] == ':') {
|
||||||
if (j == 0) j = i;
|
if (j == 0) j = i;
|
||||||
|
@ -7427,7 +7427,7 @@ void clean_path(char* path)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* remove leading '/' for nucleus. Preserve case of single "/" */
|
/* remove leading '/' for nucleus. Preserve case of single "/" */
|
||||||
sz = WSTRLEN(path);
|
sz = (long)WSTRLEN(path);
|
||||||
while (sz > 2 && path[0] == WS_DELIM) {
|
while (sz > 2 && path[0] == WS_DELIM) {
|
||||||
sz--;
|
sz--;
|
||||||
WMEMMOVE(path, path + 1, sz);
|
WMEMMOVE(path, path + 1, sz);
|
||||||
|
|
Loading…
Reference in New Issue