mirror of
				https://git.libssh.org/projects/libssh.git
				synced 2025-11-03 21:53:14 +03:00 
			
		
		
		
	tests: Fixed some cppcheck warnings.
This commit is contained in:
		
				
					committed by
					
						
						Andreas Schneider
					
				
			
			
				
	
			
			
			
						parent
						
							7f0761885c
						
					
				
				
					commit
					e3311d03db
				
			@@ -75,12 +75,12 @@ int benchmarks_ping_latency (const char *host, float *average){
 | 
			
		||||
  }
 | 
			
		||||
  if(!found)
 | 
			
		||||
    goto parseerror;
 | 
			
		||||
  fclose(fd);
 | 
			
		||||
  pclose(fd);
 | 
			
		||||
  return 0;
 | 
			
		||||
 | 
			
		||||
parseerror:
 | 
			
		||||
  fprintf(stderr,"Parse error : couldn't locate average in %s",line);
 | 
			
		||||
  fclose(fd);
 | 
			
		||||
  pclose(fd);
 | 
			
		||||
  return -1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -132,6 +132,7 @@ int torture_rmdirs(const char *path) {
 | 
			
		||||
            rewinddir(d);
 | 
			
		||||
        }
 | 
			
		||||
    } else {
 | 
			
		||||
        closedir(d);
 | 
			
		||||
        return -1;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -257,6 +258,7 @@ failed:
 | 
			
		||||
    }
 | 
			
		||||
    ssh_disconnect(t->ssh);
 | 
			
		||||
    ssh_free(t->ssh);
 | 
			
		||||
	free(t);
 | 
			
		||||
 | 
			
		||||
    return NULL;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user