From c7979c6f5599a636b2858e9e24893ff357dd9fc8 Mon Sep 17 00:00:00 2001
From: Brian Behlendorf <behlendorf1@llnl.gov>
Date: Thu, 12 Mar 2009 15:49:23 -0700
Subject: [PATCH] Check realpath() return code.

---
 cmd/ztest/ztest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c
index 313475ed96..086e6d7ef9 100644
--- a/cmd/ztest/ztest.c
+++ b/cmd/ztest/ztest.c
@@ -2789,7 +2789,7 @@ ztest_verify_blocks(char *pool)
 	FILE *fp;
 
 	/* Designed to be run exclusively in the development tree */
-	(void) realpath(getexecname(), bin);
+	VERIFY(realpath(getexecname(), bin) != NULL);
 	strstr(bin, "/ztest/")[0] = '\0';
 
 	(void) sprintf(zdb,