Skip to content

Commit

Permalink
Remove unneeded call to strlen
Browse files Browse the repository at this point in the history
  • Loading branch information
orgads committed May 31, 2019
1 parent 86e52ba commit ab3afd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/kex.c
Expand Up @@ -4296,7 +4296,7 @@ libssh2_session_method_pref(LIBSSH2_SESSION * session, int method_type,
} }
} }


if(strlen(newprefs) == 0) { if(!*newprefs) {
LIBSSH2_FREE(session, newprefs); LIBSSH2_FREE(session, newprefs);
return _libssh2_error(session, LIBSSH2_ERROR_METHOD_NOT_SUPPORTED, return _libssh2_error(session, LIBSSH2_ERROR_METHOD_NOT_SUPPORTED,
"The requested method(s) are not currently " "The requested method(s) are not currently "
Expand Down

0 comments on commit ab3afd8

Please sign in to comment.