summaryrefslogtreecommitdiffstats
path: root/nest
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2004-07-01 17:01:26 +0200
committerOndrej Filip <feela@network.cz>2004-07-01 17:01:26 +0200
commit02ad2737fd24573d870a5009a624c9b3c49aa176 (patch)
tree7753e121581f96d478328c7768bda7011b4a85d9 /nest
parentbc4ea680cea9eca46cd2c5f41db91c3014f90167 (diff)
downloadbird-02ad2737fd24573d870a5009a624c9b3c49aa176.tar
bird-02ad2737fd24573d870a5009a624c9b3c49aa176.zip
Password WALK_LIST bugfix.
Diffstat (limited to 'nest')
-rw-r--r--nest/password.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/nest/password.c b/nest/password.c
index 6309602..0bc38f1 100644
--- a/nest/password.c
+++ b/nest/password.c
@@ -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);
}