Code style: space after 'if'
[openssl.git] / crypto / des / des.c
index 402695160d20213f661276272fdd737e98c6afad..586aed72378cc1ecc8d762b9fbe504c028ae8b97 100644 (file)
@@ -228,14 +228,14 @@ int main(int argc, char **argv)
     }
     if (error)
         usage();
-        /*-
-         * We either
-         * do checksum or
-         * do encrypt or
-         * do decrypt or
-         * do decrypt then ckecksum or
-         * do checksum then encrypt
-         */
+    /*-
+     * We either
+     * do checksum or
+     * do encrypt or
+     * do decrypt or
+     * do decrypt then ckecksum or
+     * do checksum then encrypt
+     */
     if (((eflag + dflag) == 1) || cflag) {
         if (eflag)
             do_encrypt = DES_ENCRYPT;
@@ -455,8 +455,10 @@ void doencryption(void)
             rem = l % 8;
             len = l - rem;
             if (feof(DES_IN)) {
-                for (i = 7 - rem; i > 0; i--)
-                    RAND_pseudo_bytes(buf + l++, 1);
+                for (i = 7 - rem; i > 0; i--) {
+                    if (RAND_pseudo_bytes(buf + l++, 1) < 0)
+                        goto problems;
+                }
                 buf[l++] = rem;
                 ex = 1;
                 len += rem;