Skip to content

Use memset for initializing EXI documents and fragments #117

@andcaspe

Description

@andcaspe

Describe the problem

Currently, the initialization of exiDoc and exiFrag structures is done by explicitly setting each field to its default value. This can be simplified and made more maintainable by using memset to zero-initialize the entire structure.

Benefits:

  • Cleaner and shorter code
  • Reduced risk of missing a field during initialization
  • Easier to maintain when structures evolve

Describe your solution

Suggestion:

Replace manual field-by-field initialization with memset(&exiDoc, 0, sizeof(exiDoc)); or memset(&exiFrag, 0, sizeof(exiFrag)); where appropriate.

Additional context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions