summaryrefslogtreecommitdiff
path: root/berkeley/lpc.c
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2014-02-06 18:33:34 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2014-02-06 18:33:34 +0000
commit7e86f2f686334cb3db458b4585dfce9c1b712bc4 (patch)
tree88b4a0536faefcada96437e7cddd3a36cfdee0a4 /berkeley/lpc.c
parentb1564baed9db112cb1334027f1d141877d88fcf4 (diff)
downloadcups-7e86f2f686334cb3db458b4585dfce9c1b712bc4.tar.gz
Full sweep of all Clang warnings, plus some bug fixes for incorrect memcpy usage.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11558 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'berkeley/lpc.c')
-rw-r--r--berkeley/lpc.c30
1 files changed, 11 insertions, 19 deletions
diff --git a/berkeley/lpc.c b/berkeley/lpc.c
index e8ccb91c0..b2e2e4130 100644
--- a/berkeley/lpc.c
+++ b/berkeley/lpc.c
@@ -1,24 +1,16 @@
/*
* "$Id$"
*
- * "lpc" command for CUPS.
+ * "lpc" command for CUPS.
*
- * Copyright 2007-2012 by Apple Inc.
- * Copyright 1997-2006 by Easy Software Products.
+ * Copyright 2007-2014 by Apple Inc.
+ * Copyright 1997-2006 by Easy Software Products.
*
- * These coded instructions, statements, and computer programs are the
- * property of Apple Inc. and are protected by Federal copyright
- * law. Distribution and use rights are outlined in the file "LICENSE.txt"
- * which should have been included with this file. If this file is
- * file is missing or damaged, see the license at "http://www.cups.org/".
- *
- * Contents:
- *
- * main() - Parse options and commands.
- * compare_strings() - Compare two command-line strings.
- * do_command() - Do an lpc command...
- * show_help() - Show help messages.
- * show_status() - Show printers.
+ * These coded instructions, statements, and computer programs are the
+ * property of Apple Inc. and are protected by Federal copyright
+ * law. Distribution and use rights are outlined in the file "LICENSE.txt"
+ * which should have been included with this file. If this file is
+ * file is missing or damaged, see the license at "http://www.cups.org/".
*/
/*
@@ -32,7 +24,7 @@
* Local functions...
*/
-static int compare_strings(const char *, const char *, int);
+static int compare_strings(const char *, const char *, size_t);
static void do_command(http_t *, const char *, const char *);
static void show_help(const char *);
static void show_status(http_t *, const char *);
@@ -158,9 +150,9 @@ main(int argc, /* I - Number of command-line arguments */
static int /* O - -1 or 1 = no match, 0 = match */
compare_strings(const char *s, /* I - Command-line string */
const char *t, /* I - Option string */
- int tmin) /* I - Minimum number of unique chars in option */
+ size_t tmin) /* I - Minimum number of unique chars in option */
{
- int slen; /* Length of command-line string */
+ size_t slen; /* Length of command-line string */
slen = strlen(s);