mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-10 10:26:47 +09:00
config: Get rid of the dynamic seen array
* This makes the array constant in the session structure, avoiding allocations and frees while parsing the file * It also drops passing the seen array to all the functions, because it is already part of the passed session * The test cases are adjusted to match these changes Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
8f887e82c7
commit
21e2522360
@@ -1163,6 +1163,10 @@ void torture_write_file(const char *filename, const char *data){
|
||||
close(fd);
|
||||
}
|
||||
|
||||
void torture_reset_config(ssh_session session)
|
||||
{
|
||||
memset(session->opts.options_seen, 0, sizeof(session->opts.options_seen));
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
struct argument_s arguments;
|
||||
|
||||
Reference in New Issue
Block a user