diff options
Diffstat (limited to 'cmd-set-password.c')
-rw-r--r-- | cmd-set-password.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cmd-set-password.c b/cmd-set-password.c index 583914c9..17817ac1 100644 --- a/cmd-set-password.c +++ b/cmd-set-password.c @@ -1,4 +1,4 @@ -/* $Id: cmd-set-password.c,v 1.1 2009-01-11 00:48:42 nicm Exp $ */ +/* $Id: cmd-set-password.c,v 1.2 2009-01-18 14:40:48 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -33,7 +33,7 @@ void cmd_set_password_send(struct cmd *, struct buffer *); void cmd_set_password_recv(struct cmd *, struct buffer *); void cmd_set_password_free(struct cmd *); void cmd_set_password_init(struct cmd *, int); -void cmd_set_password_print(struct cmd *, char *, size_t); +size_t cmd_set_password_print(struct cmd *, char *, size_t); struct cmd_set_password_data { char *password; @@ -153,7 +153,7 @@ cmd_set_password_free(struct cmd *self) xfree(data); } -void +size_t cmd_set_password_print(struct cmd *self, char *buf, size_t len) { struct cmd_set_password_data *data = self->data; @@ -161,9 +161,10 @@ cmd_set_password_print(struct cmd *self, char *buf, size_t len) off += xsnprintf(buf, len, "%s", self->entry->name); if (data == NULL) - return; + return (off); if (off < len && data->flag_encrypted) off += xsnprintf(buf + off, len - off, " -c"); if (off < len && data->password != NULL) off += xsnprintf(buf + off, len - off, " password"); + return (off); } |