Skip to content

Commit

Permalink
gfio: color parse stack removal
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
axboe committed Sep 25, 2012
1 parent adbf612 commit 26b0b19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gfio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1349,13 +1349,13 @@ static void combo_entry_destroy(GtkWidget *widget, gpointer data)
static void fill_color_from_rgb(GdkColor *c, gfloat r, gfloat g, gfloat b)
{
gint R, G, B;
gchar tmp[32];
gchar tmp[8];

memset(c, 0, sizeof(*c));
R = r * 255;
G = g * 255;
B = b * 255;
sprintf(tmp, "#%02x%02x%02x", R, G, B);
snprintf(tmp, sizeof(tmp), "#%02x%02x%02x", R, G, B);
gdk_color_parse(tmp, c);
}

Expand Down

0 comments on commit 26b0b19

Please sign in to comment.