Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/dist/openpam/lib more size_t casts
details: https://anonhg.NetBSD.org/src/rev/83f0d40a0e93
branches: trunk
changeset: 572351:83f0d40a0e93
user: christos <christos%NetBSD.org@localhost>
date: Thu Dec 30 16:22:45 2004 +0000
description:
more size_t casts
diffstat:
dist/openpam/lib/openpam_readline.c | 2 +-
dist/openpam/lib/openpam_ttyconv.c | 2 +-
dist/openpam/lib/pam_vprompt.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diffs (36 lines):
diff -r f0c5bae80605 -r 83f0d40a0e93 dist/openpam/lib/openpam_readline.c
--- a/dist/openpam/lib/openpam_readline.c Thu Dec 30 16:22:27 2004 +0000
+++ b/dist/openpam/lib/openpam_readline.c Thu Dec 30 16:22:45 2004 +0000
@@ -56,7 +56,7 @@
size_t len, size;
int ch;
- if ((line = malloc(MIN_LINE_LENGTH)) == NULL)
+ if ((line = malloc((size_t)MIN_LINE_LENGTH)) == NULL)
return (NULL);
size = MIN_LINE_LENGTH;
len = 0;
diff -r f0c5bae80605 -r 83f0d40a0e93 dist/openpam/lib/openpam_ttyconv.c
--- a/dist/openpam/lib/openpam_ttyconv.c Thu Dec 30 16:22:27 2004 +0000
+++ b/dist/openpam/lib/openpam_ttyconv.c Thu Dec 30 16:22:45 2004 +0000
@@ -91,7 +91,7 @@
saved_alarm = alarm((unsigned int)openpam_ttyconv_timeout);
ch = '\0';
for (len = 0; ch != '\n' && !eof && !error; ++len) {
- switch (read(fd, &ch, 1)) {
+ switch (read(fd, &ch, (size_t)1)) {
case 1:
if (len < PAM_MAX_RESP_SIZE - 1) {
buf[len + 1] = '\0';
diff -r f0c5bae80605 -r 83f0d40a0e93 dist/openpam/lib/pam_vprompt.c
--- a/dist/openpam/lib/pam_vprompt.c Thu Dec 30 16:22:27 2004 +0000
+++ b/dist/openpam/lib/pam_vprompt.c Thu Dec 30 16:22:45 2004 +0000
@@ -72,7 +72,7 @@
openpam_log(PAM_LOG_ERROR, "no conversation function");
RETURNC(PAM_SYSTEM_ERR);
}
- vsnprintf(msgbuf, PAM_MAX_MSG_SIZE, fmt, ap);
+ vsnprintf(msgbuf, (size_t)PAM_MAX_MSG_SIZE, fmt, ap);
msg.msg_style = style;
msg.msg = msgbuf;
msgp = &msg;
Home |
Main Index |
Thread Index |
Old Index