void release_engine(ENGINE *e)
{
#ifndef OPENSSL_NO_ENGINE
- if (e != NULL)
- /* Free our "structural" reference. */
- ENGINE_free(e);
+ /* Free our "structural" reference. */
+ ENGINE_free(e);
#endif
}
goto err;
}
- while (*cp) {
+ while (*cp != '\0') {
char *bp = work;
char *typestr = bp;
unsigned char *valstr;
nextismulti = 0;
/* Collect the type */
- while (*cp && *cp != '=')
+ while (*cp != '\0' && *cp != '=')
*bp++ = *cp++;
if (*cp == '\0') {
BIO_printf(bio_err,
- "%s: Hit end of string before finding the '='\n",
- opt_getprog());
+ "%s: Hit end of string before finding the '='\n",
+ opt_getprog());
goto err;
}
*bp++ = '\0';
/* Collect the value. */
valstr = (unsigned char *)bp;
- for (; *cp && *cp != '/'; *bp++ = *cp++) {
+ for (; *cp != '\0' && *cp != '/'; *bp++ = *cp++) {
if (canmulti && *cp == '+') {
nextismulti = 1;
break;
*bp++ = '\0';
/* If not at EOS (must be + or /), move forward. */
- if (*cp)
+ if (*cp != '\0')
++cp;
/* Parse */
if (!X509_NAME_add_entry_by_NID(n, nid, chtype,
valstr, strlen((char *)valstr),
-1, ismulti ? -1 : 0)) {
+ ERR_print_errors(bio_err);
BIO_printf(bio_err, "%s: Error adding name attribute \"/%s=%s\"\n",
opt_getprog(), typestr ,valstr);
goto err;