consistency: remove uneeded reference through pointer
What changed, and why it matters
This is a minor code cleanup in the user-interface drawing code. It changes how one color value is passed between functions, removing an unnecessary pointer indirection. There is no visible security relevance.
No security action needed. Treat as normal code-quality/maintenance change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In main/gui.c’s render_icon(), the local variable color was changed from const color_t* to const color_t, and the corresponding *color dereference at the display_icon() call site was replaced with color. This is a pure refactor removing an unneeded pointer/reference; the data flow and behavior are unchanged. No bounds, null-pointer, type, or privilege issues are introduced or fixed.
Changed components
main/gui.crender_icon()Inspect captured patch +2 / −2
diff --git a/main/gui.c b/main/gui.c
index 7957f10..98bec6a 100644
--- a/main/gui.c
+++ b/main/gui.c
@@ -1962,10 +1962,10 @@ static void render_icon(gui_view_node_t* node, const dispWin_t cs, const uint8_t
JADE_ASSERT(node->kind == ICON);
if (node->icon) {
- const color_t* color = node->is_selected ? &node->icon->selected_color : &node->icon->color;
+ const color_t color = node->is_selected ? node->icon->selected_color : node->icon->color;
const bool transparent = node->icon->bg_color == node->icon->color;
display_icon(&node->icon->icon, resolve_halign(0, node->icon->halign), resolve_valign(0, node->icon->valign),
- *color, cs, transparent ? NULL : &node->icon->bg_color);
+ color, cs, transparent ? NULL : &node->icon->bg_color);
}
// Draw any children directly over the current node
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.