summaryrefslogtreecommitdiff
path: root/chat/icb/patches/patch-ae
blob: 36771ff24d1afaade49138204991685c73c0ecb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$NetBSD: patch-ae,v 1.4 2008/12/17 02:19:59 christos Exp $

--- icb/getswitch.c.orig	1995-02-24 16:20:22.000000000 -0500
+++ icb/getswitch.c	2008-12-16 20:18:01.000000000 -0500
@@ -1,6 +1,8 @@
 #include <stdio.h>
 #include <strings.h>
 #include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
 
 /* getswitch - parse multicharacter option arguments.
  */
@@ -43,7 +45,7 @@
 	if (thisswitch != retswitch)
 		free(thisswitch);
 
-	thisswitch = (char *)malloc(strlen(*switchv)+1);
+	thisswitch = malloc(strlen(*switchv)+1);
 	strcpy(thisswitch, *switchv);
 	length = strlen(arg);