aboutsummaryrefslogtreecommitdiff
path: root/spectrogram.c
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2013-06-25 12:20:38 +0000
committerDimitri Sokolyuk <demon@dim13.org>2013-06-25 12:20:38 +0000
commit8b1845a22c1b0d187aabda0090d3c09e636e5a1f (patch)
treeca18e6239839ae7ad8da609f880493095cab3f0f /spectrogram.c
parent317ccc8649807d6e5021ae76f4249a04f7e72f80 (diff)
more error checking
Diffstat (limited to 'spectrogram.c')
-rw-r--r--spectrogram.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/spectrogram.c b/spectrogram.c
index 4930802..75908c1 100644
--- a/spectrogram.c
+++ b/spectrogram.c
@@ -89,6 +89,8 @@ init_palette(Display *d, float h, float dh, float s, float ds, float v, float dv
int i;
p = calloc(n, sizeof(unsigned long));
+ if (!p)
+ errx(1, "malloc failed");
hstep = (dh - h) / n;
sstep = (ds - s) / n;