ioctl() request args are unsigned longs, so don't attempt to store

them as ints.  Among other bugs, doing so at best caused benign
overflow followed by fatal sign extension on machines with 32-bit
ints and 64-bit longs.
This commit is contained in:
Bruce Evans 1998-07-14 10:32:27 +00:00
parent f69e804d24
commit af01fff37b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=37636

View File

@ -28,7 +28,7 @@
#ifndef lint
static const char rcsid[] =
"$Id$";
"$Id: vidcontrol.c,v 1.18 1997/10/27 07:52:10 charnier Exp $";
#endif /* not lint */
#include <ctype.h>
@ -170,7 +170,8 @@ void
load_font(char *type, char *filename)
{
FILE *fd = 0;
int i, io, size;
int i, size;
unsigned long io;
char *name, *fontmap;
char *prefix[] = {"", "", FONT_PATH, FONT_PATH, NULL};
char *postfix[] = {"", ".fnt", "", ".fnt"};
@ -257,7 +258,7 @@ set_cursor_type(char *appearence)
void
video_mode(int argc, char **argv, int *index)
{
int mode;
unsigned long mode;
if (*index < argc) {
if (!strcmp(argv[*index], "VGA_40x25"))