summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libtermlib/getterm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libtermlib/getterm.c b/lib/libtermlib/getterm.c
index c6216ab02c5..47e282c614b 100644
--- a/lib/libtermlib/getterm.c
+++ b/lib/libtermlib/getterm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getterm.c,v 1.12 1996/12/09 01:18:17 tholo Exp $ */
+/* $OpenBSD: getterm.c,v 1.13 1996/12/14 07:18:47 tholo Exp $ */
/*
* Copyright (c) 1996 SigmaSoft, Th. Lockert <tholo@sigmasoft.com>
@@ -31,7 +31,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: getterm.c,v 1.12 1996/12/09 01:18:17 tholo Exp $";
+static char rcsid[] = "$OpenBSD: getterm.c,v 1.13 1996/12/14 07:18:47 tholo Exp $";
#endif
#include <stdlib.h>
@@ -148,14 +148,14 @@ _ti_gettermcap(name)
ttytype[MAXSIZE - 1] = '\0';
}
else {
- int n;
+ size_t n;
n = s - dummy - (dummy[2] == '|' ? 3 : 0);
cur_term->names = malloc(n + 1);
strncpy(cur_term->names, dummy + (dummy[2] == '|' ? 3 : 0), n);
cur_term->names[n] = '\0';
strncpy(ttytype, dummy + (dummy[2] == '|' ? 3 : 0),
- MIN(MAXSIZE - 1, s - dummy));
+ (size_t)MIN(MAXSIZE - 1, s - dummy));
ttytype[MAXSIZE - 1] = '\0';
*home = '\0';
while (s > dummy && *s != '|')
@@ -297,14 +297,14 @@ _ti_getterminfo(name)
ttytype[MAXSIZE - 1] = '\0';
}
else {
- int n;
+ size_t n;
n = s - dummy - (dummy[2] == '|' ? 3 : 0);
cur_term->names = malloc(n + 1);
strncpy(cur_term->names, dummy + (dummy[2] == '|' ? 3 : 0), n);
cur_term->names[n] = '\0';
strncpy(ttytype, dummy + (dummy[2] == '|' ? 3 : 0),
- MIN(MAXSIZE - 1, s - dummy));
+ (size_t)MIN(MAXSIZE - 1, s - dummy));
ttytype[MAXSIZE - 1] = '\0';
*home = '\0';
while (s > dummy && *s != '|')