diff src/mkoctfile.in.cc @ 17898:8c33abdd2f9a

maint: Avoid using NULL in C++ code. * qtinfo/parser.cc, profiler.cc, profiler.h, txt-eng-ft.cc, __init_fltk__.cc, ov-fcn-handle.cc, ov-java.cc, mkoctfile.in.cc: Avoid using NULL in C++ code.
author John W. Eaton <jwe@octave.org>
date Mon, 11 Nov 2013 01:49:57 -0500
parents f2b047f9b605
children ee7f66925267
line wrap: on
line diff
--- a/src/mkoctfile.in.cc	Sun Nov 10 21:10:41 2013 +0100
+++ b/src/mkoctfile.in.cc	Mon Nov 11 01:49:57 2013 -0500
@@ -96,10 +96,10 @@
 get_variable (const char *name, const string& defval)
 {
   const char *val = getenv (name);
-  if (val == NULL || val[0] == '\0')
+  if (val && *val)
+    return string (val);
+  else
     return defval;
-  else
-    return string (val);
 }
 
 static string