mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-30 17:26:21 +00:00
cleanup: Fix uninitialized field in color_distance()
`name` of the struct `color_def` was not initialized but is also not needed in this function.
This commit is contained in:
@@ -344,7 +344,7 @@ color_distance(const struct color_def* a, const struct color_def* b)
|
|||||||
static int
|
static int
|
||||||
find_closest_col(int h, int s, int l)
|
find_closest_col(int h, int s, int l)
|
||||||
{
|
{
|
||||||
struct color_def a = { h, s, l };
|
struct color_def a = { h, s, l, NULL };
|
||||||
int min = 0;
|
int min = 0;
|
||||||
int dmin = color_distance(&a, &color_names[0]);
|
int dmin = color_distance(&a, &color_names[0]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user