summaryrefslogtreecommitdiff
path: root/misc/fep/patches/patch-ab
blob: e7f913cbd7b0f3ef30305280826544257f82b037 (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
$NetBSD: patch-ab,v 1.6 2006/01/17 21:23:01 kristerw Exp $

--- fep_alias.c.orig	1988-11-13 01:50:58.000000000 -0500
+++ fep_alias.c	2005-12-10 16:59:27.000000000 -0500
@@ -6 +6 @@
-#endif lint
+#endif /* lint */
@@ -7,6 +7,7 @@
 
 #include <stdio.h>
 #include <ctype.h>
+#include <stdlib.h>
 #include "fep_defs.h"
 #include "fep_glob.h"
 
@@ -18,7 +19,7 @@
 
 ALIAS	alias_top = {"top", "top", (ALIAS *)0};
 ALIAS	*alias_list = &alias_top;
-CHAR	aliased_line[MAXCOMLEN+1];
+CHAR	aliased_line[MAXCMDLEN+1];
 
 /*
  * Functions
@@ -44,7 +45,7 @@
 
     while (isspace (*comline))
 	++comline;
-    if (*comline == NULL)
+    if (*comline == '\0')
 	return ((CHAR *)0);
 
     argc = mkargv (comline, argv, MAXARGS);
@@ -214,9 +215,9 @@
     if (alloc == 0)
 	return (0);
 
-    vp = (ALIAS *) calloc (sizeof (ALIAS), 1);
-    vp->al_value = (char *)0;
-    vp->al_next = (ALIAS *) 0;
+    vp = calloc (sizeof (ALIAS), 1);
+    vp->al_value = NULL;
+    vp->al_next = NULL;
     vp->al_name = allocAndCopyThere (name);
 
     vp->al_next = last->al_next;