summaryrefslogtreecommitdiff
path: root/net/yale-tftpd/patches/patch-ai
blob: 36da10dffaba3a00516dd2c4bfafa62c481fed00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
$NetBSD: patch-ai,v 1.1 2002/04/01 00:04:44 dmcmahill Exp $

--- tftpyale.c.orig	Mon Mar 20 15:11:11 1995
+++ tftpyale.c
@@ -95,7 +95,7 @@
 int	ac;
 char**	av;
 {
-	int list;
+	long list;
 
 	ac--; av++;
 	if (ac != 2) {
@@ -104,7 +104,7 @@
 	}
 
 	/* get list number */
-	list = atoi (av[1]);
+	list = atol (av[1]);
 	if (list <= 0) {
 		accessFormatError = "list argument not positive integer";
 		return 0;
@@ -157,11 +157,11 @@
  * qualified (starts with '/') check to see if the
  * prefix matches the default directory.
  */
-static int
+static long
 getAccessList (fileName)
 char* fileName;
 {
-	unsigned int list;
+	unsigned long list;
 	char* rindex();
 
 	if (*fileName == '/') {
@@ -177,7 +177,7 @@
 		}
 	}
 
-	list = (int)dict_find (fileAccessDict, fileName);
+	list = (long)dict_find (fileAccessDict, fileName);
 
 	return list ? list : defaultAccessList;
 }
@@ -269,7 +269,7 @@
 			continue;
 
 		cargv = config_fields(cnf);
-		switch ((int)dict_find (commandDict, cargv[0])) {
+		switch ((long)dict_find (commandDict, cargv[0])) {
 		  /* specify default directory */
 		  case CMD_DEFAULT_DIR:
 			if (cargc != 2)
@@ -481,7 +481,7 @@
 
 static struct CMDS {
 	char* cmdName;
-	int cmdVal;
+	long cmdVal;
 } configCmds[] ={
 	"default-directory",	CMD_DEFAULT_DIR,
 	"defaultDirectory",	CMD_DEFAULT_DIR,