[Pcsclite-cvs-commit] r6551 - in /trunk/PCSC/src: debug.c debuglog.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Wed Mar 6 13:44:17 UTC 2013
Author: rousseau
Date: Wed Mar 6 13:44:17 2013
New Revision: 6551
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=6551
Log:
cppcheck: The scope of the variable 'terms' can be reduced.
Modified:
trunk/PCSC/src/debug.c
trunk/PCSC/src/debuglog.c
Modified: trunk/PCSC/src/debug.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/debug.c?rev=6551&op=diff
==============================================================================
--- trunk/PCSC/src/debug.c (original)
+++ trunk/PCSC/src/debug.c Wed Mar 6 13:44:17 2013
@@ -56,12 +56,12 @@
/* log to stderr and stderr is a tty? */
if (isatty(fileno(stderr)))
{
- const char *terms[] = { "linux", "xterm", "xterm-color", "Eterm", "rxvt", "rxvt-unicode" };
char *term;
term = getenv("TERM");
if (term)
{
+ const char *terms[] = { "linux", "xterm", "xterm-color", "Eterm", "rxvt", "rxvt-unicode" };
unsigned int i;
/* for each known color terminal */
Modified: trunk/PCSC/src/debuglog.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/debuglog.c?rev=6551&op=diff
==============================================================================
--- trunk/PCSC/src/debuglog.c (original)
+++ trunk/PCSC/src/debuglog.c Wed Mar 6 13:44:17 2013
@@ -229,12 +229,12 @@
if ((DEBUGLOG_STDOUT_DEBUG == LogMsgType && isatty(fileno(stdout)))
|| (DEBUGLOG_STDOUT_COLOR_DEBUG == LogMsgType))
{
- const char *terms[] = { "linux", "xterm", "xterm-color", "Eterm", "rxvt", "rxvt-unicode", "xterm-256color" };
char *term;
term = getenv("TERM");
if (term)
{
+ const char *terms[] = { "linux", "xterm", "xterm-color", "Eterm", "rxvt", "rxvt-unicode", "xterm-256color" };
unsigned int i;
/* for each known color terminal */
More information about the Pcsclite-cvs-commit
mailing list