edid: prefix private functions with "_di_"

The extra underscore indicates that it's not a function which is
part of our public API. This will allow the next commit to setup the
linker to export functions based on their name.

Signed-off-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
Simon Ser 2022-06-09 14:45:47 +02:00 committed by Pekka Paalanen
parent c7a2edb74c
commit c383417629
3 changed files with 10 additions and 10 deletions

10
edid.c
View file

@ -325,7 +325,7 @@ parse_ext(struct di_edid *edid, const uint8_t data[static EDID_BLOCK_SIZE])
}
struct di_edid *
di_edid_parse(const void *data, size_t size)
_di_edid_parse(const void *data, size_t size)
{
struct di_edid *edid;
int version, revision;
@ -374,7 +374,7 @@ di_edid_parse(const void *data, size_t size)
parse_vendor_product(data, &edid->vendor_product);
if (!parse_basic_params_features(edid, data)) {
di_edid_destroy(edid);
_di_edid_destroy(edid);
return NULL;
}
@ -383,7 +383,7 @@ di_edid_parse(const void *data, size_t size)
+ 0x36 + i * EDID_BYTE_DESCRIPTOR_SIZE;
if (!parse_byte_descriptor(edid, byte_desc_data)
&& errno != ENOTSUP) {
di_edid_destroy(edid);
_di_edid_destroy(edid);
return NULL;
}
}
@ -391,7 +391,7 @@ di_edid_parse(const void *data, size_t size)
for (i = 0; i < exts_len; i++) {
ext_data = (const uint8_t *) data + (i + 1) * EDID_BLOCK_SIZE;
if (!parse_ext(edid, ext_data) && errno != ENOTSUP) {
di_edid_destroy(edid);
_di_edid_destroy(edid);
return NULL;
}
}
@ -400,7 +400,7 @@ di_edid_parse(const void *data, size_t size)
}
void
di_edid_destroy(struct di_edid *edid)
_di_edid_destroy(struct di_edid *edid)
{
size_t i;

View file

@ -60,12 +60,12 @@ struct di_edid_ext {
* di_edid_destroy().
*/
struct di_edid *
di_edid_parse(const void *data, size_t size);
_di_edid_parse(const void *data, size_t size);
/**
* Destroy an EDID data structure.
*/
void
di_edid_destroy(struct di_edid *edid);
_di_edid_destroy(struct di_edid *edid);
#endif

6
info.c
View file

@ -12,13 +12,13 @@ di_info_parse_edid(const void *data, size_t size)
struct di_edid *edid;
struct di_info *info;
edid = di_edid_parse(data, size);
edid = _di_edid_parse(data, size);
if (!edid)
return NULL;
info = calloc(1, sizeof(*info));
if (!info) {
di_edid_destroy(edid);
_di_edid_destroy(edid);
return NULL;
}
@ -30,7 +30,7 @@ di_info_parse_edid(const void *data, size_t size)
void
di_info_destroy(struct di_info *info)
{
di_edid_destroy(info->edid);
_di_edid_destroy(info->edid);
free(info);
}