summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-01-22 08:56:33 +0200
committerToomas Soome <tsoome@me.com>2019-06-24 22:14:24 +0300
commitce67cb245e522293fca567799070a5cdd4267929 (patch)
tree96b2fdbaf66c9e8d3ec260cb63d3d92af1faab59
parent559f8b540657be5e8d59b0b7017058a7ac6ba4bb (diff)
downloadillumos-joyent-ce67cb245e522293fca567799070a5cdd4267929.tar.gz
11131 libtsol: NULL pointer errors
Reviewed by: Peter Tribble <peter.tribble@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/lib/libtsol/common/getpathbylabel.c5
-rw-r--r--usr/src/lib/libtsol/common/setflabel.c4
2 files changed, 2 insertions, 7 deletions
diff --git a/usr/src/lib/libtsol/common/getpathbylabel.c b/usr/src/lib/libtsol/common/getpathbylabel.c
index 069ce0a6c6..22a0da1329 100644
--- a/usr/src/lib/libtsol/common/getpathbylabel.c
+++ b/usr/src/lib/libtsol/common/getpathbylabel.c
@@ -23,9 +23,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-
/*
* Name: getpathbylabel.c
*
@@ -182,7 +179,7 @@ tsol_mkmntlist(void)
return (NULL);
}
resetmnttab(mounted);
- while (getmntent(mounted, &mnt) == NULL) {
+ while (getmntent(mounted, &mnt) == 0) {
mntl = (struct mntlist *)malloc(sizeof (*mntl));
if (mntl == NULL) {
tsol_mlist_free(mntst);
diff --git a/usr/src/lib/libtsol/common/setflabel.c b/usr/src/lib/libtsol/common/setflabel.c
index 1d645c8d23..f22905541a 100644
--- a/usr/src/lib/libtsol/common/setflabel.c
+++ b/usr/src/lib/libtsol/common/setflabel.c
@@ -23,8 +23,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Change the label of a file
*/
@@ -204,7 +202,7 @@ zonecopy(m_label_t *src_win_sl, char *remote_dir, char *filename,
if (datasize > bufsize) {
if ((callp = (labeld_data_t *)malloc(datasize)) == NULL) {
- return (NULL);
+ return (0);
}
bufsize = datasize;
}