summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2008-02-11 13:20:11 +0000
committerAndy Polyakov <appro@openssl.org>2008-02-11 13:20:11 +0000
commit8b7745571fe856ab3a3f4dda82b32eb27f788b28 (patch)
tree6b8bc9432935f7343bb1a9f93ada71b449c1fb1b
parent0d2b761daece9f6c25a05c6e68fd524a2149f17a (diff)
downloadopenssl-new-8b7745571fe856ab3a3f4dda82b32eb27f788b28.tar.gz
Source readability fix, which incidentally works around XLC compiler bug
[from HEAD]. PR: 1272
-rw-r--r--crypto/asn1/t_x509.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/crypto/asn1/t_x509.c b/crypto/asn1/t_x509.c
index fe2ea4046d..eb776b7b3b 100644
--- a/crypto/asn1/t_x509.c
+++ b/crypto/asn1/t_x509.c
@@ -449,13 +449,13 @@ int X509_NAME_print(BIO *bp, X509_NAME *name, int obase)
l=80-2-obase;
- b=s=X509_NAME_oneline(name,NULL,0);
- if (!*s)
+ b=X509_NAME_oneline(name,NULL,0);
+ if (!*b)
{
OPENSSL_free(b);
return 1;
}
- s++; /* skip the first slash */
+ s=b+1; /* skip the first slash */
c=s;
for (;;)
@@ -480,8 +480,7 @@ int X509_NAME_print(BIO *bp, X509_NAME *name, int obase)
{
i=s-c;
if (BIO_write(bp,c,i) != i) goto err;
- c+=i;
- c++;
+ c=s+1; /* skip following slash */
if (*s != '\0')
{
if (BIO_write(bp,", ",2) != 2) goto err;