password_same utility function

This commit is contained in:
Pavel Machek 2000-05-10 13:42:46 +00:00
parent a3f657ac76
commit 45a48e2de2
2 changed files with 9 additions and 0 deletions

View file

@ -51,3 +51,11 @@ password_strncpy(char *to, char *from, int len)
} }
} }
int
password_same(struct password_item *old, struct password_item *new)
{
return ((old->from == new->from) &&
(old->to == new->to) &&
(old->passive == new->passive) &&
password_same(old, new));
}

View file

@ -20,6 +20,7 @@ struct password_item {
extern struct password_item *last_password_item; extern struct password_item *last_password_item;
struct password_item *get_best_password(struct password_item *head, int flags); struct password_item *get_best_password(struct password_item *head, int flags);
extern int password_same(struct password_item *, struct password_item *);
extern void password_strncpy(char *to, char *from, int len); extern void password_strncpy(char *to, char *from, int len);