summaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
authorRoland Baer <roland@Vista.(none)>2007-08-15 13:10:21 +0300
committerDanny Baumann <dannybaumann@web.de>2007-08-15 12:27:36 +0200
commit622d3e815597f0df2827e68e3d12555239d5794b (patch)
treeef78615d02a7f2e82a188dc59efee2b7c48162bc /selection.c
parentfaebc39daccb8b0e6a50c1b6a3abba7e19df4b18 (diff)
downloadgroup-622d3e815597f0df2827e68e3d12555239d5794b.tar.gz
group-622d3e815597f0df2827e68e3d12555239d5794b.tar.bz2
Simplified code: calloc(NULL, is equivalent to malloc(
Diffstat (limited to 'selection.c')
-rw-r--r--selection.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/selection.c b/selection.c
index 8f206ac..53d2f9d 100644
--- a/selection.c
+++ b/selection.c
@@ -106,16 +106,8 @@ groupFindWindowsInRegion (CompScreen *s,
if (gw->group && groupFindGroupInWindows (gw->group, ret, count))
continue;
- if (count == 0)
- {
- ret = calloc (1, sizeof (CompWindow));
- ret[0] = w;
- }
- else
- {
- ret = realloc (ret, sizeof (CompWindow) * (count + 1));
- ret[count] = w;
- }
+ ret = realloc (ret, sizeof (CompWindow) * (count + 1));
+ ret[count] = w;
count++;
}