diff options
Diffstat (limited to 'nest/password.c')
-rw-r--r-- | nest/password.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nest/password.c b/nest/password.c index ce7941e..f0f433a 100644 --- a/nest/password.c +++ b/nest/password.c @@ -38,3 +38,15 @@ get_best_password(struct password_item *head, int flags) } return best; } + +void +password_strncpy(char *to, char *from, int len) +{ + int i; + for (i=0; i<len; i++) { + *to++ = *from; + if (*from) + from++; + } +} + |