Skip to content

Commit 306b26a

Browse files
mamerhenium
authored andcommitted
ext/openssl/ossl.h: Remove a variable that is used only in assert
It produces "unused variable" warnings in NDEBUG mode [ Cherry-picked from ruby.git commit 3bca1b6aadff. ]
1 parent de02942 commit 306b26a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ext/openssl/ossl.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,8 @@ VALUE ossl_buf2str(char *buf, int len);
8888
VALUE ossl_str_new(const char *, long, int *);
8989
#define ossl_str_adjust(str, p) \
9090
do{\
91-
long len = RSTRING_LEN(str);\
9291
long newlen = (long)((p) - (unsigned char*)RSTRING_PTR(str));\
93-
assert(newlen <= len);\
92+
assert(newlen <= RSTRING_LEN(str));\
9493
rb_str_set_len((str), newlen);\
9594
}while(0)
9695
/*

0 commit comments

Comments
 (0)