summaryrefslogtreecommitdiff
path: root/usr/src/lib/nsswitch/user/common/getprinter.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib/nsswitch/user/common/getprinter.c')
-rw-r--r--usr/src/lib/nsswitch/user/common/getprinter.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/usr/src/lib/nsswitch/user/common/getprinter.c b/usr/src/lib/nsswitch/user/common/getprinter.c
index 25bc1ac49d..7e62b69724 100644
--- a/usr/src/lib/nsswitch/user/common/getprinter.c
+++ b/usr/src/lib/nsswitch/user/common/getprinter.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* "user" backend for nsswitch "printers" database. This module implements
@@ -95,6 +94,7 @@ _nss_user_printers_convert(char *entry, nss_XbyY_args_t *args)
* backends don't include it in the data passed to the backend. For this
* reason, we process everything here and don't bother calling the backend.
*/
+/*ARGSUSED*/
static nss_status_t
_nss_user_XY_printers(be, args, filter)
user_backend_ptr_t be;
@@ -107,7 +107,6 @@ _nss_user_XY_printers(be, args, filter)
*/
{
nss_status_t res;
- int parsestat;
int namelen;
if (be->buf == 0 &&
@@ -119,12 +118,12 @@ _nss_user_XY_printers(be, args, filter)
res = NSS_NOTFOUND;
namelen = strlen(args->key.name);
+ /*CONSTCOND*/
while (1) {
char *instr = be->buf;
char *p, *limit;
int linelen;
int found = 0;
- char *key, *value;
/*
* _nss_user_read_line does process the '\' that are used
@@ -194,6 +193,7 @@ getent(be, a)
res = NSS_NOTFOUND;
+ /*CONSTCOND*/
while (1) {
char *instr = be->buf;
int linelen;
@@ -240,6 +240,7 @@ static user_backend_op_t printers_ops[] = {
getbyname
};
+/*ARGSUSED*/
nss_backend_t *
_nss_user_printers_constr(dummy1, dummy2, dummy3)
const char *dummy1, *dummy2, *dummy3;
@@ -248,7 +249,7 @@ _nss_user_printers_constr(dummy1, dummy2, dummy3)
if ((home = getenv("HOME")) == NULL)
home = "";
- snprintf(path, sizeof (path), "%s/.printers", home);
+ (void) snprintf(path, sizeof (path), "%s/.printers", home);
return (_nss_user_constr(printers_ops,
sizeof (printers_ops) / sizeof (printers_ops[0]),