[Git][NTPsec/ntpsec][master] 3 commits: libisc: remove unused variable.

Gary E. Miller gitlab at mg.gitlab.com
Wed May 31 02:01:25 UTC 2017


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
53d991ed by Gary E. Miller at 2017-05-30T18:49:24-07:00
libisc: remove unused variable.

- - - - -
8e944019 by Gary E. Miller at 2017-05-30T18:54:57-07:00
libisc: remove three more unused variables.

- - - - -
87c9ef09 by Gary E. Miller at 2017-05-30T18:59:59-07:00
libisc: remove  null dereference

- - - - -


2 changed files:

- libisc/assertions.c
- libisc/backtrace.c


Changes:

=====================================
libisc/assertions.c
=====================================
--- a/libisc/assertions.c
+++ b/libisc/assertions.c
@@ -79,7 +79,7 @@ isc_assertion_typetotext(isc_assertiontype_t type) {
 		result = "INVARIANT";
 		break;
 	default:
-		result = NULL;
+		result = "(null)";
 	}
 	return (result);
 }
@@ -95,7 +95,6 @@ default_callback(const char *file, int line, isc_assertiontype_t type,
 	void *tracebuf[BACKTRACE_MAXFRAME];
 	int i, nframes = 0;
 	const char *logsuffix = ".";
-	const char *fname;
 	isc_result_t result;
 
 	result = isc_backtrace_gettrace(tracebuf, BACKTRACE_MAXFRAME, &nframes);
@@ -106,11 +105,7 @@ default_callback(const char *file, int line, isc_assertiontype_t type,
 		file, line, isc_assertion_typetotext(type), cond, logsuffix);
 	if (result == ISC_R_SUCCESS) {
 		for (i = 0; i < nframes; i++) {
-			unsigned long offset;
-
-			fname = NULL;
-			fprintf(stderr, "#%d %p in ??\n", i,
-				tracebuf[i]);
+			fprintf(stderr, "#%d %p in ??\n", i, tracebuf[i]);
 		}
 	}
 	fflush(stderr);


=====================================
libisc/backtrace.c
=====================================
--- a/libisc/backtrace.c
+++ b/libisc/backtrace.c
@@ -18,17 +18,6 @@
 #include "isc/result.h"
 #include "isc/util.h"
 
-/*
- * Define empty (default) symbol table used in backtrace.c
- * If the application wants to have a complete symbol table, it should redefine
- * isc__backtrace_symtable with the complete table in some way, and link the
- * version of the library not including this definition
- * (e.g. libisc-nosymbol.a).
- */
-
-static const int isc__backtrace_nsymbols = 0;
-static const isc_backtrace_symmap_t isc__backtrace_symtable[] = { { NULL, "" } };
-
 #ifdef ISC_PLATFORM_USEBACKTRACE
 /*
  * Getting a back trace of a running process is tricky and highly platform



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/ec745a58c338cb33c9b66735eea22da2aed19652...87c9ef0935ff4f4d88811b7836a65b07be3e434a

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/ec745a58c338cb33c9b66735eea22da2aed19652...87c9ef0935ff4f4d88811b7836a65b07be3e434a
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170531/a2a21fbc/attachment.html>


More information about the vc mailing list