Source readability fix, which incidentally works around XLC compiler bug.
authorAndy Polyakov <appro@openssl.org>
Sat, 29 Dec 2007 18:32:34 +0000 (18:32 +0000)
committerAndy Polyakov <appro@openssl.org>
Sat, 29 Dec 2007 18:32:34 +0000 (18:32 +0000)
crypto/asn1/t_x509.c

index 206f681320951ab11ade1dfdb8bf8c9858d78add..1bb8e82d63fb5361bf41091e8cd3d1689a3ddfcb 100644 (file)
@@ -437,13 +437,13 @@ int X509_NAME_print(BIO *bp, X509_NAME *name, int obase)
 
        l=80-2-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;
                }
                {
                OPENSSL_free(b);
                return 1;
                }
-       s++; /* skip the first slash */
+       s=b+1; /* skip the first slash */
 
        c=s;
        for (;;)
 
        c=s;
        for (;;)
@@ -468,8 +468,7 @@ int X509_NAME_print(BIO *bp, X509_NAME *name, int obase)
                        {
                        i=s-c;
                        if (BIO_write(bp,c,i) != i) goto err;
                        {
                        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;
                        if (*s != '\0')
                                {
                                if (BIO_write(bp,", ",2) != 2) goto err;