1
1

publickey_init: errors are negative, fix check

Detected by clang-analyzer.
Этот коммит содержится в:
Daniel Stenberg 2012-08-08 15:15:30 +02:00
родитель 6c27922ac1
Коммит 1abf2057de

Просмотреть файл

@ -1,5 +1,5 @@
/* Copyright (c) 2004-2007, Sara Golemon <sarag@libssh2.org>
* Copyright (c) 2010 by Daniel Stenberg
* Copyright (c) 2010-2012 by Daniel Stenberg
* All rights reserved.
*
* Redistribution and use in source and binary forms,
@ -384,7 +384,7 @@ static LIBSSH2_PUBLICKEY *publickey_init(LIBSSH2_SESSION *session)
_libssh2_error(session, LIBSSH2_ERROR_EAGAIN,
"Would block sending publickey version packet");
return NULL;
} else if (rc) {
} else if (rc < 0) {
_libssh2_error(session, rc,
"Unable to send publickey version packet");
goto err_exit;