From 4496e10f1315a72c915871801d95788884bfdb92 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 19 Sep 2013 14:18:27 +0200 Subject: xpl: dead code. mmap(2) (void*)-1 on failure --- x-plane-plugin/plugin.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/x-plane-plugin/plugin.c b/x-plane-plugin/plugin.c index eae2bf0b..dd771ab5 100644 --- a/x-plane-plugin/plugin.c +++ b/x-plane-plugin/plugin.c @@ -108,11 +108,7 @@ PLUGIN_API int XPluginStart ( char * outName, char * outSignature, char * outDes if (view_x && view_y && view_z && view_heading && view_pitch) { lck_posix = PortableLockedShm_init(WINE_SHM_NAME, WINE_MTX_NAME, sizeof(WineSHM)); if (lck_posix->mem == (void*)-1) { - fprintf(stderr, "opentrack failed to init SHM #1!\n"); - return 0; - } - if (lck_posix->mem == NULL) { - fprintf(stderr, "opentrack failed to init SHM #2!\n"); + fprintf(stderr, "opentrack failed to init SHM!\n"); return 0; } shm_posix = (WineSHM*) lck_posix->mem; -- cgit v1.2.3