Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp566104lqo; Fri, 10 May 2024 08:09:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVan8jDT2QyY4rZMm596Bl7+Jgq8M6b0EEITlqi1daD0zeR7NiQ5rK5mXFv/UwyYJHpQGaZw2tO68FK9tgPEnODQsdA7wyjouHkd24yjQ== X-Google-Smtp-Source: AGHT+IFVuiv+0WS9C79SoXlk06+3pjshDLkCRhidR+aOVqQMiuhKIWfM3wdV8hMfcML145qu22vd X-Received: by 2002:a50:8ac2:0:b0:572:4faf:ed68 with SMTP id 4fb4d7f45d1cf-5734d67b076mr2044055a12.27.1715353770834; Fri, 10 May 2024 08:09:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715353770; cv=pass; d=google.com; s=arc-20160816; b=pedvZCflp94pmKAahUq2Be6d9g845UWMm2WlMRG08ZBGlh7ilWL1Sg1CUfUPlnH+ta UszZEFwyZLWfRwnE60O1hDeFw0LqAsVDrcditVa9uhK5zflahO1ZHPmy+ZuzjpmR4ucY DInfJUv+8VZ7lQEPN9LIGE8jCH7IwBXQc3e0LgHt9BPnkoPjsSkz13IvJGbN9IwyksKb Qz/IXQUlLQNS/Qtlzn/WqKWc2ghnVIILuRh6DdFcZANA85Eb5tJr5PWhL2gouOqUIMOj xtDY434u3b5p4N+o+mVrMCJwEbHIZv0uMGcD+X6GRI47BrlrN1vEhvfFbRzHbtM17rbg 5uPQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:to:from :dkim-signature; bh=DmN/QXiBT6Q7B5yL26We4foGBdMjdLBvDkyHwtuXyoA=; fh=4lGQI6056MBa4/oovMyIYaKLn+Wz/24RGvUivMmQP8E=; b=HJ2fnId0lKsVPcRGjoBXMdAASNNY19s0Q+4+R401XAcHNxMyR92qFd0XDgMDV5ls9m DVxCZQEW/syW4HJB82wwowbyBY7TuM52OMi0O32mfZpYaxDTh48d8YW0h0u8TQMCMSNK sdLq1jbi+iJ8GM48hxmNWxuX6GJeo81f/86hEH+A3WmU+a8y6FVoiGbmwpPgqULpa/d4 +u6KURdD7G2o4+1uM8fyYI3YLBCKfAmpJaCRuOILJF2gbH7xUSNUL9l2EFnahl6T4kL1 KZ/OG/OyytFApgAQam8zy4tcwp709mMRGpVZRl3f4/0cgu83T7tM8H8rwtz4wv+4DTF2 Hp8A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mBnp9fFy; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-bluetooth+bounces-4498-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4498-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c2d4e92si1987922a12.283.2024.05.10.08.09.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 08:09:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-4498-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mBnp9fFy; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-bluetooth+bounces-4498-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4498-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id EC1601F2595C for ; Fri, 10 May 2024 15:09:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E1FBD17109E; Fri, 10 May 2024 15:09:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mBnp9fFy" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com [209.85.222.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E4410EAC0 for ; Fri, 10 May 2024 15:09:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715353764; cv=none; b=AFYoGi63eP5TanUDc75dp4Li1d2eAzHWmhxYlTFTirgZH3NzpF35QIFwq1lmpVS0UzY3lx2ARWV+SlLaPKVcRzfHJnU5jZidML+lJbT+RXEjYX37cD+2cQNH2/CGim/edmS963wP7avZHT0GWt0MY4j3DY51huAXYkZzG1Y9WH0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715353764; c=relaxed/simple; bh=e5ylN8vQtbjw1aAsCYYD/mFgAeLAui0Dm4MbeX1XaS0=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=k/hnYqS/YuMmx5g8XO/F0Xls7GyWAQ7npPH7oAvXRJgvb9rHKi8TL43Me1dHyNi26VQbko9j75fSfPbdf3yXmFRMR+qBGagkYPPeXbs124F7FC0BEnoEf3DpP5FQFhQS6HxhhH2VSuvsKtXJLkyAJid9G1ooVf0n8YSpo0/aWhc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=mBnp9fFy; arc=none smtp.client-ip=209.85.222.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qk1-f182.google.com with SMTP id af79cd13be357-792c7704e09so83990185a.1 for ; Fri, 10 May 2024 08:09:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715353761; x=1715958561; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=DmN/QXiBT6Q7B5yL26We4foGBdMjdLBvDkyHwtuXyoA=; b=mBnp9fFy0xy9hXEwJNUjaSkiMgHeT9B53ZJ5NV3S4WxrJ504IcgRu4q90OlPx4n3Uu pAstspa0WsHcPpCiBJ2JbgJTmJL+8CgbR4YkAjTcnCBrMOaHmrZaizynrVukABKyTgyw 4SXPQQfwToiviu+gIWKkkQw1IsY6SqB18LQtHvnpm1tUXkvf7Nq8kllE6nkdx3uicFFz /LEz6Sn2CZJm+niPSi11r00M7MWEfRa+RzqeQL65ABCoZbJC6vngceVTdURP4sb0Ke9F sd7Sy7yDd1ghMt6AM4uCYUkwLYSvMFxkTX7mcVxt5ZbIjRto+iEK4y+KoOrC3NX8Y0RH g7ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715353761; x=1715958561; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DmN/QXiBT6Q7B5yL26We4foGBdMjdLBvDkyHwtuXyoA=; b=w6JwZGn6vAbLEt8DDNll5AbRwKmjUFM4+lmB3KlcT73CpZDo1B81k6i+bxVzWHD/wb lH1G1n+Ptsw4TAvQrfO0/BL203FeW+CxArvbfo/DPYc8wuhtFh0VpEf289ZQRtFl1/Nw mNNR0K9YFhKWn/b0J5EoayFLgA/JBb/8q0cs7qK3/BCb3BIABP3IZaEjReFUXf3de08j y8le7gOzj8LcUMJb6cBtdOPpqMUP/hC9c/s7X4aAtbkg3He9LnxPrSsSpfnDCUmvtcUa GT6gheK8Ugh0oGifsPCr1mEFFlUGsD+fqEMwVA4CcPB74wxfIucNosjQ9E1TEUAnspIu 4pmg== X-Gm-Message-State: AOJu0Yzv/aiDjwNmqANB5+zB7rSsI7C3aJoUtIK4c9+JSn3TKrZ4Y1iH otLU2zJoUpjvvOFQtKO06do265Qh4u/0ksW5+yKxuvZhgTnbyuwVtUio5A== X-Received: by 2002:ad4:522b:0:b0:6a0:e768:aa7d with SMTP id 6a1803df08f44-6a15cc7d637mr97676696d6.23.1715353761076; Fri, 10 May 2024 08:09:21 -0700 (PDT) Received: from lvondent-mobl4.. (syn-107-146-107-067.res.spectrum.com. [107.146.107.67]) by smtp.gmail.com with ESMTPSA id a1e0cc1a2514c-7fae0a8c0c1sm260332241.34.2024.05.10.08.09.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 08:09:20 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v1] shared/util: Fix build error on malloc0 Date: Fri, 10 May 2024 11:09:15 -0400 Message-ID: <20240510150919.1492039-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Luiz Augusto von Dentz This fixes the parameter order of calloc which causes the following error on recent gcc: CC client/mgmt.o In file included from client/mgmt.c:43: client/mgmt.c: In function ‘cmd_add_ext_adv_params’: client/mgmt.c:5057:28: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] 5057 | cp = malloc0(sizeof(*cp)); | --- src/shared/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/util.h b/src/shared/util.h index a8ba23499289..bd71577d60c0 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -85,7 +85,7 @@ do { \ })) #define newa(t, n) ((t*) alloca(sizeof(t)*(n))) -#define malloc0(n) (calloc((n), 1)) +#define malloc0(n) (calloc(1, (n))) char *strdelimit(char *str, char *del, char c); int strsuffix(const char *str, const char *suffix); -- 2.44.0