Skip to content

lib/softtoken/{sdb.c,sftkdbti.h}: Align sftkdb_known_attributes_size type#31

Closed
nvinson wants to merge 1 commit into
nss-dev:masterfrom
nvinson:master
Closed

lib/softtoken/{sdb.c,sftkdbti.h}: Align sftkdb_known_attributes_size type#31
nvinson wants to merge 1 commit into
nss-dev:masterfrom
nvinson:master

Conversation

@nvinson
Copy link
Copy Markdown

@nvinson nvinson commented Aug 17, 2025

sftkdb_known_attributes_size is defined with conflicting types. In /lib/softtoken/sdb.c it is defined as a 'const size_t'; whereas in lib/softtoken/sftkdbti.h it is defined as an 'unsigned int'. The correct type for sftkdb_known_attributes_size is size_t since its value is derived from the size of the sftkdb_known_attributes array.

Fixes: 1983399

…type

sftkdb_known_attributes_size is defined with conflicting types. In
/lib/softtoken/sdb.c it is defined as a 'const size_t'; whereas in
lib/softtoken/sftkdbti.h it is defined as an 'unsigned int'. The correct
type for sftkdb_known_attributes_size is size_t since its value is
derived from the size of the sftkdb_known_attributes array.

Fixes: 1983399

Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
@nvinson nvinson changed the title lib/softtoken/{sdb.c,sftkdbti.h}: Align sftkdb_known_attributes_size … lib/softtoken/{sdb.c,sftkdbti.h}: Align sftkdb_known_attributes_size type Aug 17, 2025
@Frosne
Copy link
Copy Markdown
Collaborator

Frosne commented Aug 18, 2025

Hello, thank you for your PR.
Do you mind submitting the patch through Phabricator?

Feel free to ping me if you have any problems!

@nvinson
Copy link
Copy Markdown
Author

nvinson commented Aug 18, 2025 via email

@Frosne
Copy link
Copy Markdown
Collaborator

Frosne commented Aug 18, 2025

Lovely, thanks !

@Frosne Frosne closed this Aug 18, 2025
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.

2 participants