Skip to content

Commit 414f95e

Browse files
committed
chore: code review comment re: static inline struct
1 parent f5c7fd2 commit 414f95e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

addon/openssl-crypto.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ bool sign_rsa(void* unused_ctx,
359359
}
360360

361361
void* opensslsym(const char* name) {
362-
static struct OwnProcessDylib {
362+
struct OwnProcessDylib {
363363
bool initialized = false;
364364
#ifdef _WIN32
365365
HMODULE lib;
@@ -386,7 +386,8 @@ void* opensslsym(const char* name) {
386386
return reinterpret_cast<void*>(dlsym(lib, name));
387387
}
388388
#endif
389-
} dl;
389+
};
390+
static OwnProcessDylib dl;
390391
if (!dl.lib) {
391392
throw new std::runtime_error("Could not open process handle");
392393
}

0 commit comments

Comments
 (0)