Tidy: modernize-use-nullptr
[alexxy/gromacs.git] / src / gromacs / fileio / libxdrf.cpp
index ceabe761ecb64e41b7aee6cb144a68d091dc71d9..b6d17c649ad7c5f604d31367597f70668414c89a 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -396,8 +396,8 @@ static void receiveints(int buf[], const int num_of_ints, int num_of_bits,
 
 int xdr3dfcoord(XDR *xdrs, float *fp, int *size, float *precision)
 {
-    int     *ip  = NULL;
-    int     *buf = NULL;
+    int     *ip  = nullptr;
+    int     *buf = nullptr;
     gmx_bool bRead;
 
     /* preallocate a small buffer and ip on the stack - if we need more
@@ -468,7 +468,7 @@ int xdr3dfcoord(XDR *xdrs, float *fp, int *size, float *precision)
             bufsize        = static_cast<int>(size3 * 1.2);
             ip             = reinterpret_cast<int *>(malloc(size3 * sizeof(*ip)));
             buf            = reinterpret_cast<int *>(malloc(bufsize * sizeof(*buf)));
-            if (ip == NULL || buf == NULL)
+            if (ip == nullptr || buf == nullptr)
             {
                 fprintf(stderr, "malloc failed\n");
                 exit(1);
@@ -814,7 +814,7 @@ int xdr3dfcoord(XDR *xdrs, float *fp, int *size, float *precision)
             bufsize        = static_cast<int>(size3 * 1.2);
             ip             = reinterpret_cast<int *>(malloc(size3 * sizeof(*ip)));
             buf            = reinterpret_cast<int *>(malloc(bufsize * sizeof(*buf)));
-            if (ip == NULL || buf == NULL)
+            if (ip == nullptr || buf == nullptr)
             {
                 fprintf(stderr, "malloc failed\n");
                 exit(1);