summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-06-01 17:05:55 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-06-01 17:05:55 +0100
commit1ef00ff720226c211444806d9fdf67ce2046685b (patch)
tree9a00bc384b75e44df41940cea563d1c7e90172d6
parentdc0fe44bebfdee63bcda4d185b85fe9e1cb16a71 (diff)
sna/dri: Fix typo, check for NULL after allocations to spot failure!
Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_dri.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index c74ecc42..c26c128c 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -1369,7 +1369,7 @@ sna_dri_schedule_flip(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
}
info = calloc(1, sizeof(struct sna_dri_frame_event));
- if (!info)
+ if (info == NULL)
return FALSE;
info->type = type;
@@ -1415,7 +1415,7 @@ sna_dri_schedule_flip(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
info->event_data);
} else {
info = calloc(1, sizeof(struct sna_dri_frame_event));
- if (info)
+ if (info == NULL)
return FALSE;
info->sna = sna;