Skip to content

fix uninitialized authData - #854

Merged
dgarske merged 1 commit into
wolfSSL:masterfrom
miyazakh:fix_uninitialized_var
Dec 8, 2025
Merged

fix uninitialized authData#854
dgarske merged 1 commit into
wolfSSL:masterfrom
miyazakh:fix_uninitialized_var

Conversation

@miyazakh

@miyazakh miyazakh commented Dec 6, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@miyazakh miyazakh assigned miyazakh and wolfSSL-Bot and unassigned miyazakh Dec 6, 2025
@divinity76

divinity76 commented Dec 6, 2025

Copy link
Copy Markdown
Contributor

Never understood why people bother initializing stuff like

WS_UserAuthData authData;
memset(authData, 0, sizeof(authData));

what's wrong with C's brace initializer

WS_UserAuthData authData = { 0 };

? why not use it?

@dgarske

dgarske commented Dec 8, 2025

Copy link
Copy Markdown
Member

Never understood why people bother initializing stuff like

WS_UserAuthData authData;
memset(authData, 0, sizeof(authData));

what's wrong with C's brace initializer

WS_UserAuthData authData = { 0 };

? why not use it?

Portability. Some older C compilers do not like it even though its part of C89.

@dgarske
dgarske merged commit a473a05 into wolfSSL:master Dec 8, 2025
93 checks passed
@miyazakh
miyazakh deleted the fix_uninitialized_var branch December 9, 2025 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants