Skip to content

Bytecode API discrepancy: map_removekey return value  #23

Description

@val-ms

Describe the bug

I discovered that the documentation for the bytecode API function map_remove lies. It says:

Returns
0 on success, key was present
1 if key was not present
<0 if ksize doesn’t match keysize specified at table creation

in truth it used to return whatever cli_map_removekey() returned in https://github.com/Cisco-Talos/clamav/blob/clamav-0.105.1/libclamav/bytecode_api.c#L1432-L1438,
and that used to return 0 if the key was not present, and 1 if the key was present and removed: https://github.com/Cisco-Talos/clamav/blob/clamav-0.105.1/libclamav/hashtab.c#L893-L914

I'm making this issue because we haven't converted the old doxygen docs to markdown, and we also don't have a way at present to re-generate the PDF user manual. So when we do the documentation overhaul for the compiler project, we ought to fix this discrepancy.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions