From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [ANNOUNCE] kvm-83 release Date: Tue, 13 Jan 2009 14:37:34 -0600 Message-ID: <496CFB8E.1060407@codemonkey.ws> References: <496C9CE0.2080103@redhat.com> <496CBE09.4060801@wonghome.net> <1231867653.4290.196.camel@localhost.localdomain> <496CFA65.9000706@msgid.tls.msk.ru> <496CFB29.6070809@msgid.tls.msk.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: Mark McLoughlin , John Wong , Avi Kivity , KVM list To: Michael Tokarev Return-path: Received: from mail-qy0-f11.google.com ([209.85.221.11]:52153 "EHLO mail-qy0-f11.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752652AbZAMUhv (ORCPT ); Tue, 13 Jan 2009 15:37:51 -0500 Received: by qyk4 with SMTP id 4so252255qyk.13 for ; Tue, 13 Jan 2009 12:37:50 -0800 (PST) In-Reply-To: <496CFB29.6070809@msgid.tls.msk.ru> Sender: kvm-owner@vger.kernel.org List-ID: Michael Tokarev wrote: > Michael Tokarev wrote: > >> Mark McLoughlin wrote: >> > [] > >>> --- qemu/net.c >>> +++ qemu/net.c >>> @@ -1740,7 +1740,7 @@ void net_cleanup(void) >>> TAPState *s = vc->opaque; >>> >>> if (strcmp(vc->model, "tap") == 0 && >>> - sscanf(vc->info_str, "ifname=%63s ", ifname) == 1 && >>> + sscanf(vc->info_str, "ifname=%63s,", ifname) == 1 && >>> >> Hmm. What if ifname=foo is the last parameter? >> > > And while we're at it.. Why the parsing isn't done like this: > > for(tok = strtok(arg, ","); tok; tok = strtok(NULL, ",")) { > if (strncmp(tok, "ifname=", 7) == 0) > strcpy(ifname, tok+7); > else if ... > } > Because strtok is extremely evil. Regards, Anthony Liguori > -- here and everywhere else? > > /mjt > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >