Module Name: src
Committed By: maya
Date: Tue Mar 7 11:15:08 UTC 2017
Modified Files:
src/lib/libm/gen: nan.c
Log Message:
Remove redundant null check before free()
It is guaranteed to be fine also by C99
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libm/gen/nan.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libm/gen/nan.c
diff -u src/lib/libm/gen/nan.c:1.2 src/lib/libm/gen/nan.c:1.3
--- src/lib/libm/gen/nan.c:1.2 Mon Apr 28 20:23:01 2008
+++ src/lib/libm/gen/nan.c Tue Mar 7 11:15:08 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: nan.c,v 1.2 2008/04/28 20:23:01 martin Exp $ */
+/* $NetBSD: nan.c,v 1.3 2017/03/07 11:15:08 maya Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#if defined(LIBM_SCCS) && !defined(lint) && !defined(NAN_FUNCTION)
-__RCSID("$NetBSD: nan.c,v 1.2 2008/04/28 20:23:01 martin Exp $");
+__RCSID("$NetBSD: nan.c,v 1.3 2017/03/07 11:15:08 maya Exp $");
#endif /* LIBM_SCCS and not lint */
#include <assert.h>
@@ -78,8 +78,7 @@ NAN_FUNCTION(const char *tagp)
res = NAN_STRTOD(nstr, NULL);
- if (buf != NULL)
- free(buf);
+ free(buf);
return res;
}