mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 01:31:55 +00:00
Password WALK_LIST bugfix.
This commit is contained in:
parent
bc4ea680ce
commit
02ad2737fd
@ -18,10 +18,13 @@ password_find(list *l)
|
||||
{
|
||||
struct password_item *pi;
|
||||
|
||||
WALK_LIST(pi, *l)
|
||||
if (l)
|
||||
{
|
||||
if ((pi->genfrom > now) && (pi->gento < now))
|
||||
return pi;
|
||||
WALK_LIST(pi, *l)
|
||||
{
|
||||
if ((pi->genfrom > now) && (pi->gento < now))
|
||||
return pi;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@ -29,6 +32,6 @@ password_find(list *l)
|
||||
void password_cpy(char *dst, char *src, int size)
|
||||
{
|
||||
bzero(dst, size);
|
||||
memcpy(dst, src, strlen(src) < size ? strlen(src) : size);
|
||||
memcpy(dst, src, strlen(src) < (unsigned) size ? strlen(src) : (unsigned) size);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user