Commit 45a48e2d authored by Pavel Machek's avatar Pavel Machek

password_same utility function

parent a3f657ac
......@@ -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));
}
......@@ -20,6 +20,7 @@ struct password_item {
extern struct password_item *last_password_item;
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment