[Mesa-dev] [PATCH v2 1/3] gallium/hud: Add define for struct hud_graph name array

Robert Foss robert.foss at collabora.com
Thu Jun 29 13:21:26 UTC 2017


Define the length of the name field of struct hud_graph with
HUD_GRAPH_NAME_LEN.

Signed-off-by: Robert Foss <robert.foss at collabora.com>
---
 src/gallium/auxiliary/hud/hud_private.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/hud/hud_private.h b/src/gallium/auxiliary/hud/hud_private.h
index 2b1717d2c4..3a958d3146 100644
--- a/src/gallium/auxiliary/hud/hud_private.h
+++ b/src/gallium/auxiliary/hud/hud_private.h
@@ -87,6 +87,7 @@ struct hud_context {
    bool has_srgb;
 };
 
+#define HUD_GRAPH_NAME_LEN 128
 struct hud_graph {
    /* initialized by common code */
    struct list_head head;
@@ -95,7 +96,7 @@ struct hud_graph {
    float *vertices; /* ring buffer of vertices */
 
    /* name and query */
-   char name[128];
+   char name[HUD_GRAPH_NAME_LEN];
    void *query_data;
    void (*begin_query)(struct hud_graph *gr);
    void (*query_new_value)(struct hud_graph *gr);
-- 
2.11.0



More information about the mesa-dev mailing list