From patchwork Sat Mar 20 08:05:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 48204 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6F107B7D15 for ; Sat, 20 Mar 2010 19:15:39 +1100 (EST) Received: from localhost ([127.0.0.1]:54324 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NstpR-0003yl-GH for incoming@patchwork.ozlabs.org; Sat, 20 Mar 2010 04:14:41 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NsthB-0008KC-Kp for qemu-devel@nongnu.org; Sat, 20 Mar 2010 04:06:09 -0400 Received: from [199.232.76.173] (port=41611 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nsth6-0008Jl-5y for qemu-devel@nongnu.org; Sat, 20 Mar 2010 04:06:05 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nsth4-0006sE-Th for qemu-devel@nongnu.org; Sat, 20 Mar 2010 04:06:03 -0400 Received: from moutng.kundenserver.de ([212.227.126.171]:58629) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nsth4-0006s0-EL for qemu-devel@nongnu.org; Sat, 20 Mar 2010 04:06:02 -0400 Received: from flocke.weilnetz.de (p54ADFD33.dip.t-dialin.net [84.173.253.51]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0M0KWj-1NccEF18NZ-00v93x; Sat, 20 Mar 2010 09:05:58 +0100 Received: from stefan by flocke.weilnetz.de with local (Exim 4.71) (envelope-from ) id 1Nstgz-0002Ws-AD; Sat, 20 Mar 2010 09:05:57 +0100 From: Stefan Weil To: QEMU Developers X-Mailer: git-send-email 1.7.0 X-Provags-ID: V01U2FsdGVkX19Yg6Gwm47fytKZQ9fSZPfehVZd6kG5q6fL16M zTT9q9b7BdNqxhRvptcQ+wAcwNizahB7CBC/BbDdWsYGYvpo0r 1733L2blu+sj5kLzfKKrx6A1Se2BGZooEFo/kX2nXeF+9zfdeD k0w== X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Subject: [Qemu-devel] [PATCH] curses: Fix compilation error X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org d7234f4d7e373a708e1df9ab565a71b71b189025 was incomplete and results in a compilation error when QEMU is configured with curses support. Fix this and clean up the code a little, too. Signed-off-by: Stefan Weil --- curses.c | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/curses.c b/curses.c index f9a983a..9fd680e 100644 --- a/curses.c +++ b/curses.c @@ -294,16 +294,12 @@ static void curses_refresh(DisplayState *ds) } } -static void curses_cleanup(void *opaque) +static void curses_cleanup(Notifier *notifier) { + (void)notifier; endwin(); } -static void curses_atexit(void) -{ - curses_cleanup(NULL); -} - static void curses_setup(void) { int i, colour_default[8] = { @@ -338,7 +334,7 @@ static void curses_keyboard_setup(void) void curses_display_init(DisplayState *ds, int full_screen) { DisplayChangeListener *dcl; - static Notifier notifier = { .notify = curses_atexit }; + static Notifier notifier = { .notify = curses_cleanup }; #ifndef _WIN32 if (!isatty(1)) { fprintf(stderr, "We need a terminal output\n");