summaryrefslogtreecommitdiff
path: root/parallel/glunix/patches/patch-cs
blob: 87f70aa416190fc482d2b04d759746861a185e7b (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
$NetBSD: patch-cs,v 1.1 2005/05/29 14:38:33 wiz Exp $

--- progs/glustat/glustat.c.orig	1997-03-27 18:11:21.000000000 +0100
+++ progs/glustat/glustat.c
@@ -151,7 +151,7 @@ main(int argc, char **argv)
 	    exit(-1);
 	}
 
-	nodeInfo = malloc (totalNodes * NODE_SIZE);
+	nodeInfo = (statInfo*)malloc (totalNodes * NODE_SIZE);
 	if (nodeInfo == NULL) {
 	    fprintf (stderr, "ERROR: couldn't allocate memory.");
 	    exit (1);
@@ -250,7 +250,7 @@ myGetHostByAddress (int address, char **
     char *ptr;					/* For parsing hostname */
     
     if (ipAddrOption) {
-	*name = malloc(17);
+	*name = (char *)malloc(17);
 	sprintf(*name, "%d.%d.%d.%d",
 		(address >> 24) & 0xff, (address >> 16) & 0xff,
 		(address >>  8) & 0xff, address & 0xff);
@@ -264,7 +264,7 @@ myGetHostByAddress (int address, char **
 	return;
     }
     
-    *name = malloc (strlen (tempHost->h_name) + 1); /* Size of name */
+    *name = (char *)malloc (strlen (tempHost->h_name) + 1); /* Size of name */
     if (*name == NULL) {
 	fprintf (stderr, "ERROR: out of memory\n");
 	exit (1);