-/* $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>
*/
#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>
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 != '|')
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 != '|')