libpldm exposes many encode, decode and utility functions as part of its API, but none of them are prefixed to prevent symbol clashes in applications that link against more libraries than just libpldm. For instance, some utility symbols exported by the library include crc8(), crc32() and others.
For every library prepend a chosen prefix to every interface, variable, functions, data structures, a library provides. The prefix need not necessarily be the same for all objects, a library can use more than one prefix.
libpldm exposes many encode, decode and utility functions as part of its API, but none of them are prefixed to prevent symbol clashes in applications that link against more libraries than just libpldm. For instance, some utility symbols exported by the library include
crc8()
,crc32()
and others.This violates the best practices suggestion from Good Practices in Library Design, Implementation, and Maintenance: