Less mental retardation.

This commit is contained in:
Murilo Pereira
2011-05-08 20:20:22 -03:00
parent ea9ff3cfb5
commit 4802244efa
17 changed files with 40 additions and 21 deletions

View File

@@ -4,10 +4,11 @@
#include <string.h>
#include <errno.h>
#include "deck.h"
#include "common.h"
void allocate_deck(struct deck **deck) {
if (!(*deck = malloc(sizeof(**deck)))) {
fprintf(stderr, "%s: %s (%s:%d)\n", program_name, strerror(errno), __FILE__, __LINE__ - 1);
fprintf(stderr, tty_solitaire_error_message(errno, __FILE__, __LINE__));
exit(errno);
}