I think *readline() makes a better name
This commit is contained in:
parent
4df48aef41
commit
82bdd12a8b
@ -780,7 +780,7 @@ LIBSSH2_API void
|
|||||||
libssh2_knownhost_free(LIBSSH2_KNOWNHOSTS *hosts);
|
libssh2_knownhost_free(LIBSSH2_KNOWNHOSTS *hosts);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* libssh2_knownhost_read()
|
* libssh2_knownhost_readline()
|
||||||
*
|
*
|
||||||
* Pass in a line of a file of 'type'. It makes libssh2 read this line.
|
* Pass in a line of a file of 'type'. It makes libssh2 read this line.
|
||||||
*
|
*
|
||||||
@ -788,7 +788,7 @@ libssh2_knownhost_free(LIBSSH2_KNOWNHOSTS *hosts);
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
LIBSSH2_API int
|
LIBSSH2_API int
|
||||||
libssh2_knownhost_read(LIBSSH2_KNOWNHOSTS *hosts,
|
libssh2_knownhost_readline(LIBSSH2_KNOWNHOSTS *hosts,
|
||||||
const char *line, size_t len, int type);
|
const char *line, size_t len, int type);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -487,7 +487,7 @@ static int hostline(LIBSSH2_KNOWNHOSTS *hosts,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* libssh2_knownhost_read()
|
* libssh2_knownhost_readline()
|
||||||
*
|
*
|
||||||
* Pass in a line of a file of 'type'.
|
* Pass in a line of a file of 'type'.
|
||||||
*
|
*
|
||||||
@ -515,7 +515,7 @@ static int hostline(LIBSSH2_KNOWNHOSTS *hosts,
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
LIBSSH2_API int
|
LIBSSH2_API int
|
||||||
libssh2_knownhost_read(LIBSSH2_KNOWNHOSTS *hosts,
|
libssh2_knownhost_readline(LIBSSH2_KNOWNHOSTS *hosts,
|
||||||
const char *line, size_t len, int type)
|
const char *line, size_t len, int type)
|
||||||
{
|
{
|
||||||
const char *cp;
|
const char *cp;
|
||||||
@ -603,7 +603,7 @@ libssh2_knownhost_readfile(LIBSSH2_KNOWNHOSTS *hosts,
|
|||||||
file = fopen(filename, "r");
|
file = fopen(filename, "r");
|
||||||
if(file) {
|
if(file) {
|
||||||
while(fgets(buf, sizeof(buf), file)) {
|
while(fgets(buf, sizeof(buf), file)) {
|
||||||
if(libssh2_knownhost_read(hosts, buf, strlen(buf), type))
|
if(libssh2_knownhost_readline(hosts, buf, strlen(buf), type))
|
||||||
break;
|
break;
|
||||||
num++;
|
num++;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user