diff options
| author | Dana Jansens <danakj@orodu.net> | 2010-02-12 13:55:26 -0500 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2010-02-12 13:55:26 -0500 |
| commit | 4f93731cdbecbf43b82aa000c07ec8b40f97dd03 (patch) | |
| tree | 023b9a8787b4488487c0328302516c08c430c948 /openbox/place.c | |
| parent | 1d57f7b08590255e57dd5931a1993507b4f116c2 (diff) | |
use g_slice_new() instead of g_new() part 2
Diffstat (limited to 'openbox/place.c')
| -rw-r--r-- | openbox/place.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openbox/place.c b/openbox/place.c index cf4d3048..8292d6a2 100644 --- a/openbox/place.c +++ b/openbox/place.c @@ -158,7 +158,7 @@ static gboolean place_random(ObClient *client, gint *x, gint *y) static GSList* area_add(GSList *list, Rect *a) { - Rect *r = g_new(Rect, 1); + Rect *r = g_slice_new(Rect); *r = *a; return g_slist_prepend(list, r); } @@ -210,7 +210,7 @@ static GSList* area_remove(GSList *list, Rect *a) } /* 'r' is not being added to the result list, so free it */ - g_free(r); + g_slice_free(Rect, r); } } g_slist_free(list); @@ -332,7 +332,7 @@ static gboolean place_nooverlap(ObClient *c, gint *x, gint *y) } while (spaces) { - g_free(spaces->data); + g_slice_free(Rect, spaces->data); spaces = g_slist_delete_link(spaces, spaces); } } |
