diff options
author | Pavel Machek <pavel@ucw.cz> | 1999-05-31 19:15:52 +0000 |
---|---|---|
committer | Pavel Machek <pavel@ucw.cz> | 1999-05-31 19:15:52 +0000 |
commit | 2e6197d634a14533899915477032f082e675e35f (patch) | |
tree | 3c53b76032896ffae20fa39532b30863363b0c1c /nest/password.c | |
parent | 9c9e49ac392dfdbff97be579842028a4eb1d0dec (diff) |
Added password_strncpy() which pads destination with zeros.
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 ce7941ea..f0f433ab 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++; + } +} + |