From patchwork Tue May 19 12:38:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yousong Zhou X-Patchwork-Id: 473894 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id CD9E5140D4F for ; Tue, 19 May 2015 22:51:31 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=Go+cggWa; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 10A1C28C071; Tue, 19 May 2015 14:48:43 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 6B50128BDED for ; Tue, 19 May 2015 14:48:26 +0200 (CEST) X-policyd-weight: using cached result; rate: -8.5 Received: from mail-pd0-f175.google.com (mail-pd0-f175.google.com [209.85.192.175]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Tue, 19 May 2015 14:48:26 +0200 (CEST) Received: by pdfh10 with SMTP id h10so23906762pdf.3 for ; Tue, 19 May 2015 05:49:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9V0sl/UqxiMGXK6y8ToLW4SLgBPR1a0ses7dt1xCHfs=; b=Go+cggWawZg1kfPUNN9E0s1EPSfszZbl74LhZUm4IfUavFbRCM08I0frep2M8+J+6x W5nirw04I1Z1ulj8f0Qg4CI3aN9M6EcdKguAnWAwzQc7FZYqGDK4xiRIiAFRDtYG3lwI R86tMSEqDGLb2RpWRykSLTkRj3H3uNZbAnMoMGsez2veTp6vQj6NEdicqMub6/tS0aIV TRVp9UVpAQVpGOKssrUR03jrfUB4LOxaZnoENzqwgWYAGpQ548TkeLofJF/qJeHHLziR Z4Sm3OiaAaiSldr6KB8UyE8t/YZldEoSDHWbCX/G0MoeaTVYajBkicRJVaYubC1XM/Dz D9Pw== X-Received: by 10.70.41.165 with SMTP id g5mr53812366pdl.143.1432039784368; Tue, 19 May 2015 05:49:44 -0700 (PDT) Received: from debian.corp.sankuai.com ([103.29.140.56]) by mx.google.com with ESMTPSA id oj10sm13091283pdb.38.2015.05.19.05.49.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 May 2015 05:49:43 -0700 (PDT) From: Yousong Zhou To: nbd@openwrt.org Date: Tue, 19 May 2015 20:38:29 +0800 Message-Id: <1432039113-24136-3-git-send-email-yszhou4tech@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1432039113-24136-1-git-send-email-yszhou4tech@gmail.com> References: <1432039113-24136-1-git-send-email-yszhou4tech@gmail.com> Cc: openwrt-devel@lists.openwrt.org Subject: [OpenWrt-Devel] [PATCH 2/6] system: fix typo in returning address length. X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Signed-off-by: Yousong Zhou --- system.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system.h b/system.h index 94e0dd9..382c907 100644 --- a/system.h +++ b/system.h @@ -91,7 +91,7 @@ static inline int system_get_addr_family(unsigned int flags) static inline int system_get_addr_len(unsigned int flags) { - if ((flags & DEVADDR_FAMILY) == DEVADDR_INET6) + if ((flags & DEVADDR_FAMILY) != DEVADDR_INET6) return sizeof(struct in_addr); else return sizeof(struct in6_addr);