diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-01-03 19:57:09 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-01-03 19:57:44 -0800 |
commit | b6885f7aedc3b6eba62ffa1edac1e8488d938cea (patch) | |
tree | 5fa77c79e41f42c0aa15b65049340adaef4d9fcb | |
parent | dcb6c39feb63dcf7e843bd2394a2544fd4e79f9f (diff) |
Reduce scope & remove unneeded assignment of defaultp in FSGetErrorText()
Suggested by cppcheck 1.62
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | src/FSErrDis.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/FSErrDis.c b/src/FSErrDis.c index e3d296e..1a712ff 100644 --- a/src/FSErrDis.c +++ b/src/FSErrDis.c @@ -96,8 +96,6 @@ int FSGetErrorText( char *buffer, int nbytes) { - - const char *defaultp = NULL; char buf[32]; register _FSExtension *ext; @@ -105,7 +103,7 @@ int FSGetErrorText( return 0; snprintf(buf, sizeof(buf), "%d", code); if (code < (FSErrorListSize / sizeof(char *)) && code >= 0) { - defaultp = FSErrorList[code]; + const char *defaultp = FSErrorList[code]; FSGetErrorDatabaseText(svr, "FSProtoError", buf, defaultp, buffer, nbytes); } ext = svr->ext_procs; |