Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: 3.1.6-pws-3: cap modules.



This updates the cap module in accordance with 7591.  The uninitialised
variables were harmless but gcc complained.

--- Src/Modules/cap.c~	Thu Dec 17 12:17:01 1998
+++ Src/Modules/cap.c	Mon Sep  6 11:35:34 1999
@@ -48,7 +48,7 @@
 	    ret = 1;
 	}
     } else {
-	char *result;
+	char *result = NULL;
 	ssize_t length;
 	caps = cap_get_proc();
 	if(caps)
@@ -59,7 +59,7 @@
 	} else
 	    puts(result);
     }
-    cap_free(&caps);
+    cap_free(caps);
     return ret;
 }
 
@@ -69,7 +69,7 @@
     int ret = 0;
 
     do {
-	char *result;
+	char *result = NULL;
 	ssize_t length;
 	cap_t caps = cap_get_file(*argv);
 	if(caps)
@@ -79,7 +79,7 @@
 	    ret = 1;
 	} else
 	    printf("%s %s\n", *argv, result);
-	cap_free(&caps);
+	cap_free(caps);
     } while(*++argv);
     return ret;
 }
@@ -102,7 +102,7 @@
 	    ret = 1;
 	}
     } while(*++argv);
-    cap_free(&caps);
+    cap_free(caps);
     return ret;
 }
 
-- 
Peter Stephenson <pws@xxxxxx>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56100 Pisa, Italy



Messages sorted by: Reverse Date, Date, Thread, Author