diff options
| author | tedu <> | 2014-04-18 00:58:49 +0000 |
|---|---|---|
| committer | tedu <> | 2014-04-18 00:58:49 +0000 |
| commit | a1df5b66c7ad477a535e56a504d8da47e1998cfa (patch) | |
| tree | b216ca6fba673789f2c494699c4cf41d23337bfa /src/lib/libcrypto/asn1/a_print.c | |
| parent | 07f5c09b19f56c323fa22ebd5efb5a4df9f5dc4d (diff) | |
| download | openbsd-a1df5b66c7ad477a535e56a504d8da47e1998cfa.tar.gz openbsd-a1df5b66c7ad477a535e56a504d8da47e1998cfa.tar.bz2 openbsd-a1df5b66c7ad477a535e56a504d8da47e1998cfa.zip | |
lob a few more knf grenades in here to soften things up.
Diffstat (limited to 'src/lib/libcrypto/asn1/a_print.c')
| -rw-r--r-- | src/lib/libcrypto/asn1/a_print.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/libcrypto/asn1/a_print.c b/src/lib/libcrypto/asn1/a_print.c index cfd0452f13..9e421dba66 100644 --- a/src/lib/libcrypto/asn1/a_print.c +++ b/src/lib/libcrypto/asn1/a_print.c | |||
| @@ -69,8 +69,7 @@ int ASN1_PRINTABLE_type(const unsigned char *s, int len) | |||
| 69 | if (len <= 0) len= -1; | 69 | if (len <= 0) len= -1; |
| 70 | if (s == NULL) return(V_ASN1_PRINTABLESTRING); | 70 | if (s == NULL) return(V_ASN1_PRINTABLESTRING); |
| 71 | 71 | ||
| 72 | while ((*s) && (len-- != 0)) | 72 | while ((*s) && (len-- != 0)) { |
| 73 | { | ||
| 74 | c= *(s++); | 73 | c= *(s++); |
| 75 | if (!( ((c >= 'a') && (c <= 'z')) || | 74 | if (!( ((c >= 'a') && (c <= 'z')) || |
| 76 | ((c >= 'A') && (c <= 'Z')) || | 75 | ((c >= 'A') && (c <= 'Z')) || |
| @@ -99,8 +98,7 @@ int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s) | |||
| 99 | if (s->type != V_ASN1_UNIVERSALSTRING) return(0); | 98 | if (s->type != V_ASN1_UNIVERSALSTRING) return(0); |
| 100 | if ((s->length%4) != 0) return(0); | 99 | if ((s->length%4) != 0) return(0); |
| 101 | p=s->data; | 100 | p=s->data; |
| 102 | for (i=0; i<s->length; i+=4) | 101 | for (i=0; i<s->length; i+=4) { |
| 103 | { | ||
| 104 | if ((p[0] != '\0') || (p[1] != '\0') || (p[2] != '\0')) | 102 | if ((p[0] != '\0') || (p[1] != '\0') || (p[2] != '\0')) |
| 105 | break; | 103 | break; |
| 106 | else | 104 | else |
| @@ -108,8 +106,7 @@ int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s) | |||
| 108 | } | 106 | } |
| 109 | if (i < s->length) return(0); | 107 | if (i < s->length) return(0); |
| 110 | p=s->data; | 108 | p=s->data; |
| 111 | for (i=3; i<s->length; i+=4) | 109 | for (i=3; i<s->length; i+=4) { |
| 112 | { | ||
| 113 | *(p++)=s->data[i]; | 110 | *(p++)=s->data[i]; |
| 114 | } | 111 | } |
| 115 | *(p)='\0'; | 112 | *(p)='\0'; |
