From 52cea818bf68f8a2d3c48d55d00c2f8b7da25e4c Mon Sep 17 00:00:00 2001 From: Daniel Hogan Date: Tue, 28 Mar 2017 22:21:18 -0600 Subject: [PATCH] Remove delete statement. When from_scratch is true, coordinates is not allocated. A separate if statement was added to handle the case when from_scratch is true that does not try to free coordinates. --- src/formats/nwchemformat.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/formats/nwchemformat.cpp b/src/formats/nwchemformat.cpp index 6f625ad5b..79298555f 100644 --- a/src/formats/nwchemformat.cpp +++ b/src/formats/nwchemformat.cpp @@ -232,11 +232,14 @@ static const char* OPTIMIZATION_END_PATTERN = " Optimization converged"; break; tokenize(vs,buffer); } - if ((from_scratch)||(i != natoms)) - { + if (from_scratch) + { + return; + } + if (i != natoms) { delete[] coordinates; return; - } + } molecule->AddConformer(coordinates); } ryrefslogtreecommitdiff
path: root/tests/lzlib.scm
AgeCommit message (Expand)Author
2019-05-27lzlib: Add 'make-lzip-input-port/compressed'....* guix/lzlib.scm (lzwrite!, make-lzip-input-port/compressed): New procedures. * tests/lzlib.scm ("make-lzip-input-port/compressed"): New test. * guix/tests.scm (%seed): Export. Ludovic Courtès
2019-05-06Add (guix lzlib)....* guix/lzlib.scm, tests/lzlib.scm: New files. * Makefile.am (MODULES): Add guix/lzlib.scm. (SCM_TESTS): Add tests/lzlib.scm. * m4/guix.m4 (GUIX_LIBLZ_LIBDIR): New macro. * configure.ac (LIBLZ_LIBDIR): Use it. Define and substitute 'LIBLZ'. * guix/config.scm.in (%liblz): New variable. * guix/self.scm (make-config.scm): Add TODO comment. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Pierre Neidhardt