Skip to content

Drop BF_ASM constant as it's always 0 in blowfish implementation #5531

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions ext/standard/crypt_blowfish.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,9 @@
/* Just to make sure the prototypes match the actual definitions */
#include "crypt_blowfish.h"

#ifdef __i386__
#define BF_ASM 0
#define BF_SCALE 1
#elif defined(__x86_64__) || defined(__alpha__) || defined(__hppa__)
#define BF_ASM 0
#if defined(__i386__) || defined(__x86_64__) || defined(__alpha__) || defined(__hppa__)
#define BF_SCALE 1
#else
#define BF_ASM 0
#define BF_SCALE 0
#endif

Expand Down Expand Up @@ -525,10 +520,6 @@ static void BF_swap(BF_word *x, int count)
R = L; \
L = tmp4 ^ data.ctx.P[BF_N + 1];

#if BF_ASM
#define BF_body() \
_BF_body_r(&data.ctx);
#else
#define BF_body() \
L = R = 0; \
ptr = data.ctx.P; \
Expand All @@ -546,7 +537,6 @@ static void BF_swap(BF_word *x, int count)
*(ptr - 2) = L; \
*(ptr - 1) = R; \
} while (ptr < &data.ctx.S[3][0xFF]);
#endif

static void BF_set_key(const char *key, BF_key expanded, BF_key initial,
unsigned char flags)
Expand Down Expand Up @@ -658,9 +648,6 @@ static char *BF_crypt(const char *key, const char *setting,
char *output, int size,
BF_word min)
{
#if BF_ASM
extern void _BF_body_r(BF_ctx *ctx);
#endif
struct {
BF_ctx ctx;
BF_key expanded_key;
Expand Down