summaryrefslogtreecommitdiff
path: root/usr/src/cmd/print/bsd-sysv-commands/in.lpd.c
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-01-26 15:19:34 +0200
committerDan McDonald <danmcd@joyent.com>2019-02-04 11:11:46 -0500
commit5243e3342f14ea9f300eadae1c8524571a933a1b (patch)
tree135e18da8782e2186cbdda0519c1e722cf39475b /usr/src/cmd/print/bsd-sysv-commands/in.lpd.c
parent4f6502b6d39d77ac4bfb06b65b8ef1bb89b010ba (diff)
downloadillumos-joyent-5243e3342f14ea9f300eadae1c8524571a933a1b.tar.gz
10305 print: NULL pointer errors
Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Gergő Mihály Doma <domag02@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/cmd/print/bsd-sysv-commands/in.lpd.c')
-rw-r--r--usr/src/cmd/print/bsd-sysv-commands/in.lpd.c4
1 files changed, 2 insertions, 2 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 1b058ac291..b6f1bc709b 100644
--- a/usr/src/cmd/print/bsd-sysv-commands/in.lpd.c
+++ b/usr/src/cmd/print/bsd-sysv-commands/in.lpd.c
@@ -130,7 +130,7 @@ static papi_attribute_t **
parse_cf(papi_service_t svc, char *cf, char **files)
{
papi_attribute_t **list = NULL;
- char previous = NULL;
+ char previous = '\0';
char *entry;
int copies_set = 0;
int copies = 0;
@@ -509,7 +509,7 @@ berkeley_receive_files(papi_service_t svc, FILE *ifp, FILE *ofp, char *printer)
case 0x02: { /* Receive control file */
if (((cf = strchr(buf, ' ')) != NULL) &&
(strlen(cf) > 4)) {
- while ((*cf != NULL) && (isdigit(*cf) == 0))
+ while ((*cf != '\0') && (isdigit(*cf) == 0))
cf++;
rid = atoi(cf);
}