zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: 3.1.6-pws-3: cap modules.
@ 1999-09-06 10:35 Peter Stephenson
  0 siblings, 0 replies; only message in thread
From: Peter Stephenson @ 1999-09-06 10:35 UTC (permalink / raw)
  To: Zsh hackers list

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@ifh.de>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56100 Pisa, Italy


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-09-06 10:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-06 10:35 PATCH: 3.1.6-pws-3: cap modules Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).