diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-12-14 07:18:48 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-12-14 07:18:48 +0000 |
commit | fb3035e3379d9258753316427b03a4d8d0676d07 (patch) | |
tree | 0c1a470ee73d47b6c6efeadbcbf7e2217883729c /lib/libtermlib | |
parent | b0c564d59dc3fafe97b7c711cff2e49eb90637fa (diff) |
Use size_t more places
Diffstat (limited to 'lib/libtermlib')
-rw-r--r-- | lib/libtermlib/getterm.c | 12 |
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 != '|') |