]> granicus.if.org Git - cronie/commitdiff
Initialize some important variables.
authormmaslano <mmaslano@redhat.com>
Fri, 17 Aug 2007 13:03:13 +0000 (15:03 +0200)
committermmaslano <mmaslano@redhat.com>
Fri, 24 Aug 2007 12:53:49 +0000 (14:53 +0200)
do_command.c
misc.c
pw_dup.c

index 1796d1d35ceeb25b6f8d76b82276534984b78ef1..b933cf7b68e1469bffc4423eb06e330ae98ccf37 100644 (file)
@@ -446,7 +446,7 @@ child_process(entry *e, user *u) {
                int     ch = getc(in);
 
                if (ch != EOF) {
-                       FILE    *mail;
+                       FILE    *mail=0L;
                        int     bytes = 1;
                        int     status = 0;
 
diff --git a/misc.c b/misc.c
index ee31164b9018c416d369fe3fa69de7dcc20e47c2..b8756731646fbe323db4a2a89713bb3f1d84f537 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -274,7 +274,7 @@ acquire_daemonlock(int closeflag) {
        char buf[3*MAX_FNAME];
        const char *pidfile;
        char *ep;
-       long otherpid;
+       long otherpid=-1;
        ssize_t num;
 
        if (closeflag) {
index a7b5e1577b79b9e6b3931f00f215c49d47bf1f3b..c2a3c38216535628a6afd59ef7a12406b7abc7f6 100644 (file)
--- a/pw_dup.c
+++ b/pw_dup.c
@@ -47,7 +47,7 @@ static char rcsid[] = "$Id: pw_dup.c,v 1.2 2004/01/23 18:56:43 vixie Exp $";
 struct passwd *
 pw_dup(const struct passwd *pw) {
        char            *cp;
-       size_t           nsize, psize, csize, gsize, dsize, ssize, total;
+       size_t           nsize=0, psize=0, csize=0, gsize=0, dsize=0, ssize=0, total=0;
        struct passwd   *newpw;
 
        /* Allocate in one big chunk for easy freeing */