From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tobin Davis Subject: Re: [PATCH] hda empty modelname comparison Date: Wed, 07 Mar 2007 14:58:57 -0800 Message-ID: <1173308337.4531.10.camel@razman.gruemaster.com> References: <45ED81BE.4080606@amd.com> <1173297870.4531.4.camel@razman.gruemaster.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0945952408==" Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@lists.sourceforge.net Errors-To: alsa-devel-bounces@lists.sourceforge.net To: Takashi Iwai Cc: Joachim Deguara , alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org --===============0945952408== Content-Type: multipart/alternative; boundary="=-8OAFbtpk2asX6sph7Lzs" --=-8OAFbtpk2asX6sph7Lzs Content-Type: text/plain Content-Transfer-Encoding: 7bit Oops, nevermind. I've been reading too many pseudo-code documents. I expected strcmp to return true if matched. This works. Tobin On Wed, 2007-03-07 at 22:20 +0100, Takashi Iwai wrote: > + if (codec->bus->modelname && !strcmp(codec->bus->modelname, > "generic")) > + return NULL; /* use the generic parser */ > Should be: + if (codec->bus->modelname && strcmp(codec->bus->modelname, "generic")) + return NULL; /* use the generic parser */ You've got the logic reversed. -- Tobin Davis --=-8OAFbtpk2asX6sph7Lzs Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit Oops, nevermind.  I've been reading too many pseudo-code documents.  I expected strcmp to return true if matched.

This works.

Tobin

On Wed, 2007-03-07 at 22:20 +0100, Takashi Iwai wrote:
+       if (codec->bus->modelname && !strcmp(codec->bus->modelname, "generic"))
+               return NULL; /* use the generic parser */


Should be:

+       if (codec->bus->modelname && strcmp(codec->bus->modelname, "generic"))
+               return NULL; /* use the generic parser */


You've got the logic reversed.

--
Tobin Davis <tdavis@dsl-only.net>
--=-8OAFbtpk2asX6sph7Lzs-- --===============0945952408== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV --===============0945952408== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Alsa-devel mailing list Alsa-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-devel --===============0945952408==--