From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754544AbcJ2VhF (ORCPT ); Sat, 29 Oct 2016 17:37:05 -0400 Received: from smtprelay0164.hostedemail.com ([216.40.44.164]:53702 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751479AbcJ2VhE (ORCPT ); Sat, 29 Oct 2016 17:37:04 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:69:355:379:541:960:988:989:1260:1277:1311:1313:1314:1345:1373:1437:1515:1516:1518:1534:1537:1560:1593:1594:1711:1714:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3865:3866:3871:3874:5007:10004:10400:10848:11026:11658:11914:12043:12296:12438:12533:12760:13069:13311:13357:13439:14659:14721:21080:30029:30054,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: cows02_332f58ee3733 X-Filterd-Recvd-Size: 1095 Message-ID: <1477777020.23018.8.camel@perches.com> Subject: sound: bebop: strncmp length oddity From: Joe Perches To: Takashi Sakamoto Cc: Takashi Iwai , Clemens Ladisch , alsa-devel , LKML Date: Sat, 29 Oct 2016 14:37:00 -0700 Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.1-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 15 isn't the length of the string, is that really what's desired? linux/next/sound/firewire/bebob/bebop.c ----------------------------- static bool check_audiophile_booted(struct fw_unit *unit) { char name[24] = {0}; if (fw_csr_string(unit->directory, CSR_MODEL, name, sizeof(name)) < 0) return false; return strncmp(name, "FW Audiophile Bootloader", 15) != 0; }