summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-03-12 14:08:21 +0000
committerMatt Caswell <matt@openssl.org>2015-03-17 14:52:46 +0000
commit28e4f659c5542f1625b5c20c51eab3987914b485 (patch)
tree7a39125bd28fe5432bc9048eb55a923b21ef06aa
parent6a43243d1d54a8bc4056eab76237e7d474edaafc (diff)
downloadopenssl-new-28e4f659c5542f1625b5c20c51eab3987914b485.tar.gz
Remove dead code from crypto
Some miscellaneous removal of dead code from lib crypto. Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit b7573c597c1932ef709b2455ffab47348b5c54e5)
-rw-r--r--crypto/bio/b_print.c7
-rw-r--r--crypto/dso/dso_dlfcn.c7
2 files changed, 5 insertions, 9 deletions
diff --git a/crypto/bio/b_print.c b/crypto/bio/b_print.c
index f7940f28be..c2cf6e619e 100644
--- a/crypto/bio/b_print.c
+++ b/crypto/bio/b_print.c
@@ -592,7 +592,6 @@ fmtfp(char **sbuffer,
int fplace = 0;
int padlen = 0;
int zpadlen = 0;
- int caps = 0;
long intpart;
long fracpart;
long max10;
@@ -630,8 +629,7 @@ fmtfp(char **sbuffer,
/* convert integer part */
do {
- iconvert[iplace++] =
- (caps ? "0123456789ABCDEF" : "0123456789abcdef")[intpart % 10];
+ iconvert[iplace++] = "0123456789"[intpart % 10];
intpart = (intpart / 10);
} while (intpart && (iplace < (int)sizeof(iconvert)));
if (iplace == sizeof iconvert)
@@ -640,8 +638,7 @@ fmtfp(char **sbuffer,
/* convert fractional part */
do {
- fconvert[fplace++] =
- (caps ? "0123456789ABCDEF" : "0123456789abcdef")[fracpart % 10];
+ fconvert[fplace++] = "0123456789"[fracpart % 10];
fracpart = (fracpart / 10);
} while (fplace < max);
if (fplace == sizeof fconvert)
diff --git a/crypto/dso/dso_dlfcn.c b/crypto/dso/dso_dlfcn.c
index c0fcbb18bd..f629f0380d 100644
--- a/crypto/dso/dso_dlfcn.c
+++ b/crypto/dso/dso_dlfcn.c
@@ -314,7 +314,7 @@ static char *dlfcn_merger(DSO *dso, const char *filespec1,
return (NULL);
}
strcpy(merged, filespec2);
- } else
+ } else {
/*
* This part isn't as trivial as it looks. It assumes that the
* second file specification really is a directory, and makes no
@@ -322,13 +322,12 @@ static char *dlfcn_merger(DSO *dso, const char *filespec1,
* concatenation of filespec2 followed by a slash followed by
* filespec1.
*/
- {
int spec2len, len;
spec2len = strlen(filespec2);
- len = spec2len + (filespec1 ? strlen(filespec1) : 0);
+ len = spec2len + strlen(filespec1);
- if (filespec2 && filespec2[spec2len - 1] == '/') {
+ if (spec2len && filespec2[spec2len - 1] == '/') {
spec2len--;
len--;
}