Mercurial > illumos > git > illumos-omnios
changeset 21422:ea9e01f73587
11108 error: NULL pointer errors
Reviewed by: Rob Johnston <rob.johnston@joyent.com>
Reviewed by: Peter Tribble <peter.tribble@gmail.com>
Approved by: Dan McDonald <danmcd@joyent.com>
author | Toomas Soome <tsoome@me.com> |
---|---|
date | Mon, 21 Jan 2019 19:18:28 +0200 |
parents | b91951b1c5c8 |
children | bf3d3f4f3fdb |
files | usr/src/cmd/sgs/error/common/errortouch.c |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/cmd/sgs/error/common/errortouch.c Mon Jan 21 16:40:59 2019 +0200 +++ b/usr/src/cmd/sgs/error/common/errortouch.c Mon Jan 21 19:18:28 2019 +0200 @@ -24,7 +24,6 @@ * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" #include <stdio.h> #include <ctype.h> @@ -583,7 +582,7 @@ botch = 0; oktorm = 1; while ((nread = fread(edbuf, 1, sizeof (edbuf), - o_touchedfile)) != NULL) { + o_touchedfile)) != 0) { if (nread != fwrite(edbuf, 1, nread, n_touchedfile)) { /* * Catastrophe in temporary area: file system full? @@ -643,7 +642,7 @@ { int nread; - while ((nread = fread(edbuf, 1, sizeof (edbuf), tmpfile)) != NULL) { + while ((nread = fread(edbuf, 1, sizeof (edbuf), tmpfile)) != 0) { if (mustwrite(edbuf, nread, preciousfile) == 0) return (0); }