From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlesK-0004BG-Pw for qemu-devel@nongnu.org; Mon, 12 Oct 2015 11:19:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZlesH-0005Jz-H8 for qemu-devel@nongnu.org; Mon, 12 Oct 2015 11:18:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57626) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlesH-0005Jr-CO for qemu-devel@nongnu.org; Mon, 12 Oct 2015 11:18:53 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id EBC0F8F263 for ; Mon, 12 Oct 2015 15:18:52 +0000 (UTC) References: <1444637004-20195-1-git-send-email-pbonzini@redhat.com> <1444637004-20195-8-git-send-email-pbonzini@redhat.com> <561BCED5.5010303@redhat.com> From: Paolo Bonzini Message-ID: <561BCF58.8090503@redhat.com> Date: Mon, 12 Oct 2015 17:18:48 +0200 MIME-Version: 1.0 In-Reply-To: <561BCED5.5010303@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 07/21] qemu-char: convert pipe backend to data-driven creation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: armbru@redhat.com On 12/10/2015 17:16, Eric Blake wrote: >> rp) >> > { >> > + ChardevHostdev *opts = backend->pipe; >> > int fd_in, fd_out; >> > char filename_in[CHR_MAX_FILENAME_SIZE]; >> > char filename_out[CHR_MAX_FILENAME_SIZE]; >> > const char *filename = opts->device; >> > >> > - if (filename == NULL) { >> > - fprintf(stderr, "chardev: pipe: no filename given\n"); >> > - return NULL; >> > - } >> > - >> > snprintf(filename_in, CHR_MAX_FILENAME_SIZE, "%s.in", filename); > Do we need assert(filename) here? > > No, "device" is not optional in the definition of ChardevHostdev. Paolo