mirror of https://github.com/davatorium/rofi.git
[SSH] Always initialize .port field.
This commit is contained in:
parent
cf8b76c6a6
commit
871ea42785
|
@ -303,6 +303,7 @@ static SshEntry *read_hosts_file ( SshEntry * retv, unsigned int *length )
|
|||
retv = g_realloc ( retv,
|
||||
( ( *length ) + 2 ) * sizeof ( char* ) );
|
||||
retv[( *length )].hostname = g_strdup ( token );
|
||||
retv[( *length )].port = 0;
|
||||
retv[( *length ) + 1].hostname = NULL;
|
||||
( *length )++;
|
||||
}
|
||||
|
@ -430,6 +431,7 @@ static void parse_ssh_config_file ( SSHModePrivateData *pd, const char *filename
|
|||
// Add this host name to the list.
|
||||
( *retv ) = g_realloc ( ( *retv ), ( ( *length ) + 2 ) * sizeof ( SshEntry ) );
|
||||
( *retv )[( *length )].hostname = g_strdup ( token );
|
||||
( *retv )[( *length )].port = 0;
|
||||
( *retv )[( *length ) + 1].hostname = NULL;
|
||||
( *length )++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue