diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/cmd/print/bsd-sysv-commands/in.lpd.c | 14 | ||||
-rw-r--r-- | usr/src/cmd/print/bsd-sysv-commands/lpstat.c | 2 | ||||
-rw-r--r-- | usr/src/lib/print/libipp-listener/common/ipp-listener.c | 2 | ||||
-rw-r--r-- | usr/src/lib/print/libpapi-common/common/list.c | 21 |
4 files changed, 19 insertions, 20 deletions
diff --git a/usr/src/cmd/print/bsd-sysv-commands/in.lpd.c b/usr/src/cmd/print/bsd-sysv-commands/in.lpd.c index 18487c51d8..7782ee9a36 100644 --- a/usr/src/cmd/print/bsd-sysv-commands/in.lpd.c +++ b/usr/src/cmd/print/bsd-sysv-commands/in.lpd.c @@ -475,7 +475,7 @@ receive_data_file(FILE *ifp, FILE *ofp, int size) if (wrc < 0) { close(fd); unlink(file); - return(NULL); + return (NULL); } ptr += wrc; @@ -493,7 +493,7 @@ receive_data_file(FILE *ifp, FILE *ofp, int size) return (strdup(file)); } - + static papi_status_t berkeley_receive_files(papi_service_t svc, FILE *ifp, FILE *ofp, char *printer) { @@ -592,11 +592,11 @@ cyclical_service_check(char *svc_name) return (0); if ((list = getprinterbyname(svc_name, NULL)) == NULL) - return (0); /* if it doesnt' resolve, we will fail later */ + return (0); /* if it doesnt' resolve, we will fail later */ papiAttributeListGetString(list, NULL, "printer-uri-supported", &s); if ((s == NULL) || (strcasecmp(svc_name, s) != 0)) - return (0); /* they don't match */ + return (0); /* they don't match */ /* is it in uri form? */ if (uri_from_string(s, &uri) < 0) @@ -616,7 +616,7 @@ cyclical_service_check(char *svc_name) /* is it the local host? */ sysinfo(SI_HOSTNAME, buf, sizeof (buf)); if ((strcasecmp(uri->host, "localhost") != 0) && - (strcasecmp(uri->host, buf) != 0)) { + (strcasecmp(uri->host, buf) != 0)) { uri_free(uri); return (0); } @@ -667,7 +667,7 @@ main(int ac, char *av[]) if (run_user != NULL) /* get the requested user info */ pw = getpwnam(run_user); - + if (run_dir != NULL) { /* setup the run_dir */ (void) mkdir(run_dir, 0700); if (pw != NULL) @@ -675,7 +675,7 @@ main(int ac, char *av[]) } if (pw != NULL) { /* run as the requested user */ - syslog(LOG_DEBUG, "name: %s, uid: %d, gid: %d", + syslog(LOG_DEBUG, "name: %s, uid: %d, gid: %d", pw->pw_name, pw->pw_uid, pw->pw_gid); initgroups(pw->pw_name, pw->pw_gid); setgid(pw->pw_gid); diff --git a/usr/src/cmd/print/bsd-sysv-commands/lpstat.c b/usr/src/cmd/print/bsd-sysv-commands/lpstat.c index a9ce4dc054..4d0b350fd4 100644 --- a/usr/src/cmd/print/bsd-sysv-commands/lpstat.c +++ b/usr/src/cmd/print/bsd-sysv-commands/lpstat.c @@ -669,7 +669,7 @@ report_job(papi_job_t job, int show_rank, int verbose) (void) papiAttributeListGetString(attrs, NULL, "output-device-assigned", &destination); printf("\n\t assigned %s", destination); - + (void) papiAttributeListGetString(attrs, NULL, "form", &form); if (form != NULL) printf(", form %s", form); diff --git a/usr/src/lib/print/libipp-listener/common/ipp-listener.c b/usr/src/lib/print/libipp-listener/common/ipp-listener.c index fc46366ea0..33a1c4d1a0 100644 --- a/usr/src/lib/print/libipp-listener/common/ipp-listener.c +++ b/usr/src/lib/print/libipp-listener/common/ipp-listener.c @@ -401,7 +401,7 @@ cyclical_service_check(char *svc_name, int port) /* does the host match up */ sysinfo(SI_HOSTNAME, buf, sizeof (buf)); if ((strcasecmp(uri->host, "localhost") != 0) && - (strcasecmp(uri->host, buf) != 0)) { + (strcasecmp(uri->host, buf) != 0)) { uri_free(uri); return (0); } diff --git a/usr/src/lib/print/libpapi-common/common/list.c b/usr/src/lib/print/libpapi-common/common/list.c index ddd29a76df..f7c834be25 100644 --- a/usr/src/lib/print/libpapi-common/common/list.c +++ b/usr/src/lib/print/libpapi-common/common/list.c @@ -140,28 +140,27 @@ list_locate(void **list, int (*compare)(void *, void *), void *element) void list_remove(void ***list, void *item) { - int i, count; + int i, count; void **tmp = NULL; - if ((list == NULL) || (*list == NULL) || (item == NULL)) - return; + if ((list == NULL) || (*list == NULL) || (item == NULL)) + return; - for (count = 0; (*list)[count] != NULL; count++) - ; + for (count = 0; (*list)[count] != NULL; count++); if (count > 0) { - int new_size = (((count + 1) / __list_increment) + 1) * - __list_increment; + int new_size = (((count + 1) / __list_increment) + 1) * + __list_increment; - if ((tmp = (void **)calloc(new_size, sizeof (void *))) != NULL) + if ((tmp = (void **)calloc(new_size, sizeof (void *))) != NULL) tmp = *list; - + /* copy up to item */ - for (i = 0; (((*list)[i] != NULL) && ((*list)[i] != item)); i++) + for (i = 0; (((*list)[i] != NULL) && ((*list)[i] != item)); i++) tmp[i] = (*list)[i]; /* copy after item */ if ((*list)[i] == item) - for (++i; ((*list)[i] != NULL); i++) + for (++i; ((*list)[i] != NULL); i++) tmp[i-1] = (*list)[i]; } |