dect
/
libdect
Archived
13
0
Fork 0

example: use pexit()

Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
Patrick McHardy 2010-08-02 22:48:39 +02:00
parent 046e10fff4
commit c8db9f0add
3 changed files with 5 additions and 7 deletions

View File

@ -88,8 +88,6 @@ err1:
static void __init dect_audio_init(void)
{
if (SDL_Init(SDL_INIT_AUDIO) < 0) {
fprintf(stderr, "Could not initialize SDL: %s\n", SDL_GetError());
exit(1);
}
if (SDL_Init(SDL_INIT_AUDIO) < 0)
pexit("SDL_Init");
}

View File

@ -217,7 +217,7 @@ int main(int argc, char **argv)
{
rand_fd = open("/dev/urandom", O_RDONLY);
if (rand_fd < 0)
exit(1);
pexit("open /dev/urandom");
dect_common_init(&ops, argv[1]);

View File

@ -185,13 +185,13 @@ int main(int argc, char **argv)
rand_fd = open("/dev/urandom", O_RDONLY);
if (rand_fd < 0)
exit(1);
pexit("open /dev/urandom");
dect_common_init(&ops, argv[1]);
mme = dect_mm_endpoint_alloc(dh, &ipui);
if (mme == NULL)
exit(1);
pexit("dect_mm_endpoint_alloc");
mm_access_rights_req(dh, mme);
dect_event_loop();