]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix compiler warnings.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Tue, 19 May 2015 21:22:35 +0000 (21:22 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Tue, 19 May 2015 21:22:35 +0000 (21:22 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12644 a1ca3aef-8c08-0410-bb20-df032aa958be

cgi-bin/help-index.c
scheduler/testlpd.c
test/ipptool.c

index 2774437d47f1773d8117286bb0c082083a1867e1..42b4ab9109e4ffe9fd80945e43c61068193320a1 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Online help index routines for CUPS.
  *
- * Copyright 2007-2014 by Apple Inc.
+ * Copyright 2007-2015 by Apple Inc.
  * Copyright 1997-2007 by Easy Software Products.
  *
  * These coded instructions, statements, and computer programs are the
@@ -1220,7 +1220,7 @@ help_new_node(const char   *filename,     /* I - Filename */
 
   n->filename = strdup(filename);
   n->anchor   = anchor ? strdup(anchor) : NULL;
-  n->section  = (section && *section) ? strdup(section) : NULL;
+  n->section  = *section ? strdup(section) : NULL;
   n->text     = strdup(text);
   n->mtime    = mtime;
   n->offset   = offset;
index 67019c375541a16da1010276c1733f7966c91296..ecfdb197b1845b6b674b68f2a41434c0d1fe13c4 100644 (file)
@@ -3,7 +3,7 @@
  *
  * cups-lpd test program for CUPS.
  *
- * Copyright 2007-2014 by Apple Inc.
+ * Copyright 2007-2015 by Apple Inc.
  * Copyright 2006 by Easy Software Products, all rights reserved.
  *
  * These coded instructions, statements, and computer programs are the
@@ -447,7 +447,7 @@ status_long(int  outfd,                     /* I - Command file descriptor */
   * Send the "send short status" command...
   */
 
-  if (args)
+  if (args[0])
     snprintf(command, sizeof(command), "\004%s %s\n", dest, args[0]);
   else
     snprintf(command, sizeof(command), "\004%s\n", dest);
@@ -490,7 +490,7 @@ status_short(int  outfd,            /* I - Command file descriptor */
   * Send the "send short status" command...
   */
 
-  if (args)
+  if (args[0])
     snprintf(command, sizeof(command), "\003%s %s\n", dest, args[0]);
   else
     snprintf(command, sizeof(command), "\003%s\n", dest);
index 22eecc8591b218a79e7f1777650bf79c3cd4350d..1563854379d4dbffd6744ffd2e86841b22e2f7d5 100644 (file)
@@ -3516,7 +3516,7 @@ expand_variables(_cups_vars_t *vars,      /* I - Variables */
        value = getenv(temp);
         src   += tempptr - temp + 5;
       }
-      else if (vars)
+      else
       {
         if (src[1] == '{')
        {
@@ -3563,11 +3563,6 @@ expand_variables(_cups_vars_t *vars,     /* I - Variables */
 
         src += tempptr - temp + 1;
       }
-      else
-      {
-        value = "$";
-       src ++;
-      }
 
       if (value)
       {