mirror of
				https://github.com/libssh2/libssh2.git
				synced 2025-11-03 22:13:11 +03:00 
			
		
		
		
	publickey_init: errors are negative, fix check
Detected by clang-analyzer.
This commit is contained in:
		@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user