X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fepicycle.c;h=004c0ea56a1a9d123efc4a1ebc0b7dc52e81230e;hp=4eae8c945d288618c45446b92b63d402e1c293ed;hb=50be9bb40dc60130c99ffa568e6677779904ff70;hpb=5f1f12f2a37da634000f96d18d59cc73a8814ef7 diff --git a/hacks/epicycle.c b/hacks/epicycle.c index 4eae8c94..004c0ea5 100644 --- a/hacks/epicycle.c +++ b/hacks/epicycle.c @@ -225,14 +225,6 @@ random_divisor(struct state *st) } -static void -oom(struct state *st) -{ - fprintf(stderr, "Failed to allocate memory!\n"); - exit(-1); -} - - /* Construct a circle or die. */ static Circle * @@ -311,8 +303,7 @@ static Body * new_body(struct state *st) { Body *p = malloc(sizeof(Body)); - if (NULL == p) - oom(st); + if (!p) abort(); p->epicycles = new_circle_chain(st); p->current_color = 0; /* ?? start them all on different colors? */ p->next = NULL; @@ -428,8 +419,7 @@ colour_init(struct state *st, XWindowAttributes *pxgwa) if (!mono_p) { st->colors = (XColor *) malloc(sizeof(*st->colors) * (st->ncolors+1)); - if (!st->colors) - oom(st); + if (!st->colors) abort(); make_smooth_colormap (st->dpy, pxgwa->visual, st->cmap, st->colors, &st->ncolors, True, /* allocate */