From patchwork Wed Mar 17 15:11:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 86357 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2HFCaKv026936 for ; Wed, 17 Mar 2010 15:12:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751655Ab0CQPMK (ORCPT ); Wed, 17 Mar 2010 11:12:10 -0400 Received: from mail-bw0-f212.google.com ([209.85.218.212]:53325 "EHLO mail-bw0-f212.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751458Ab0CQPMI (ORCPT ); Wed, 17 Mar 2010 11:12:08 -0400 Received: by bwz4 with SMTP id 4so1148874bwz.39 for ; Wed, 17 Mar 2010 08:12:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mail-followup-to:mime-version:content-type :content-disposition:user-agent; bh=gloox8v9dRP4WqGLMhkwvl0D9QPmSmsidvgFyzvhqNw=; b=dJcNHYhDVKj9Ir6u80sIwfylC36aKUCVnKdsKce+yO1wfUy2R3GigVKAwoKTFBz97+ 6xAaGWT0llExVAjN0a9DntIYkHd2uW8J7rveldHnEfczkk+ENTMYCmFJST7nK10225HJ VlBFApihk4ImD/jE4TF6vHIHn1AirX19Bnyc8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mail-followup-to:mime-version :content-type:content-disposition:user-agent; b=Rs/dyKMfgBf9RBRkaWTjRdEJeKi+6fPqUp5iM1Jmf6g5tq02zbgRE0SOC+l/m0niEq szLeijnXYQG8bdCTJPe5TbPnfxKvlI/dnTVYVV5NjhTa0Ft8/g7slUdjfBIUXFUEpNJH q78l2CaCcc6ikv3lTjDy+jyTkbgrFeOdoO0MQ= Received: by 10.103.87.2 with SMTP id p2mr8178102mul.7.1268838724858; Wed, 17 Mar 2010 08:12:04 -0700 (PDT) Received: from bicker ([196.43.68.243]) by mx.google.com with ESMTPS id 23sm33767875mun.7.2010.03.17.08.12.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 17 Mar 2010 08:12:04 -0700 (PDT) Date: Wed, 17 Mar 2010 18:11:56 +0300 From: Dan Carpenter To: Andy Walls Cc: Mauro Carvalho Chehab , ivtv-devel@ivtvdriver.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] ivtv: sizeof() => ARRAY_SIZE() Message-ID: <20100317151156.GG5331@bicker> Mail-Followup-To: Dan Carpenter , Andy Walls , Mauro Carvalho Chehab , ivtv-devel@ivtvdriver.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 17 Mar 2010 15:12:36 +0000 (UTC) diff --git a/drivers/media/video/ivtv/ivtv-vbi.c b/drivers/media/video/ivtv/ivtv-vbi.c index f420d31..d73af45 100644 --- a/drivers/media/video/ivtv/ivtv-vbi.c +++ b/drivers/media/video/ivtv/ivtv-vbi.c @@ -134,7 +134,7 @@ void ivtv_write_vbi(struct ivtv *itv, const struct v4l2_sliced_vbi_data *sliced, } } } - if (found_cc && vi->cc_payload_idx < sizeof(vi->cc_payload)) { + if (found_cc && vi->cc_payload_idx < ARRAY_SIZE(vi->cc_payload)) { vi->cc_payload[vi->cc_payload_idx++] = cc; set_bit(IVTV_F_I_UPDATE_CC, &itv->i_flags); }