openbsd-ports/print/cups/patches/patch-systemv_lpadmin_c
ajacoutot 9ba0e992d7 - don't force optimisation nor debug
- regen patches while here
2007-05-07 13:58:07 +00:00

30 lines
928 B
Plaintext

$OpenBSD: patch-systemv_lpadmin_c,v 1.3 2007/05/07 13:58:07 ajacoutot Exp $
--- systemv/lpadmin.c.orig Tue Sep 5 22:45:47 2006
+++ systemv/lpadmin.c Mon May 7 15:47:41 2007
@@ -1963,14 +1963,14 @@ set_printer_options(
static int /* O - 0 if name is no good, 1 if name is good */
validate_name(const char *name) /* I - Name to check */
{
- const char *ptr; /* Pointer into name */
+ const signed char *ptr; /* Pointer into name */
/*
* Scan the whole name...
*/
- for (ptr = name; *ptr; ptr ++)
+ for (ptr = (const signed char *)name; *ptr; ptr ++)
if (*ptr == '@')
break;
else if ((*ptr >= 0 && *ptr <= ' ') || *ptr == 127 || *ptr == '/' ||
@@ -1981,7 +1981,7 @@ validate_name(const char *name) /* I - Name to check
* All the characters are good; validate the length, too...
*/
- return ((ptr - name) < 128);
+ return ((ptr - (const signed char *)name) < 128);
}