fixing complaints about use of uninitalized variable

Alex alexander.stohr at gmx.de
Fri Aug 12 07:31:03 PDT 2005


Please comment on the below patch.
For me it looks like this is a needed fix,
but i am just new to those interfaces.

-Alex


diff -u -U 8 dirsvc.c.orig dirsvc.c
--- dirsvc.c.orig       2005-07-25 04:10:16.000000000 +0200
+++ dirsvc.c    2005-08-12 16:41:49.320744792 +0200
@@ -248,17 +248,17 @@
      /*
       * Class doesn't exist; add it...
       */

       p = AddClass(name);

       LogMessage(L_INFO, "Added remote class \"%s\"...", name);

-      cupsdAddEvent(CUPSD_EVENT_PRINTER_ADDED, pclass, NULL,
+      cupsdAddEvent(CUPSD_EVENT_PRINTER_ADDED, p, NULL,
                     "Class \'%s\' added by directory services.", name);

      /*
       * Force the URI to point to the real server...
       */

       p->type      = type & ~CUPS_PRINTER_REJECTING;
       p->accepting = 1;
@@ -323,17 +323,17 @@
     if (p == NULL)
     {
      /*
       * Printer doesn't exist; add it...
       */

       p = AddPrinter(name);

-      cupsdAddEvent(CUPSD_EVENT_PRINTER_ADDED, pclass, NULL,
+      cupsdAddEvent(CUPSD_EVENT_PRINTER_ADDED, p, NULL,
                     "Printer \'%s\' added by directory services.", name);

       LogMessage(L_INFO, "Added remote printer \"%s\"...", name);

      /*
       * Force the URI to point to the real server...
       */




More information about the cups-devel mailing list