From patchwork Tue Mar 5 13:28:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 13582392 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (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 CAEEA58ADC for ; Tue, 5 Mar 2024 13:28:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709645292; cv=none; b=nE+kd1hMRfOO4rp5lRoovfJO9YPhbnFkr25+TShSmKrtCjysBs22KnXPL5JsJIUKy4dQ8AA+RzZtDipMqa6KHQ5AlSK1JxBhMESw++wSh35RIiFR5jaizXlOX53jU40KR4sxsUBXuJEgQtSW7Wewyj24HCS6xUYwza3A5XN9QaM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709645292; c=relaxed/simple; bh=KCKwzkWFJeYdZlmipFTXjbIZfPiNeyzFCRfrmcAbKM4=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=lRwuiRu33C+fdiowT/hajhEjgCXS4QE9SrjwmN+lTiOQgGwJ62twkoW4iFtHJI2bKyAhuSbws1OTeHqAxNUnIjN6PtI5iA4Kjj+TrIj6JYEFvuAOOajUwvrIV+zfrRJEmOaNjw22HAy8ieuTrDNKIx3w+XUuzMpAIpq37Wry7LI= 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=anQdXE0W; arc=none smtp.client-ip=209.85.214.170 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="anQdXE0W" Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-1dc9222b337so56087205ad.2 for ; Tue, 05 Mar 2024 05:28:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709645290; x=1710250090; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=xrMfbkn1tuU6SUPOaVeOyAcTiWbi2hvPZXXg+AE9aRo=; b=anQdXE0WDNpOrwkNiGshrftNH2bypyTyTF35+UkT6Sp/6H4fj1PaXSC4lvGTIVSS9E Qhdck3HQkZxeAQUQv24HRUtzouvLv0ijxqNsUMdXEDE12g41FJWvPz/S6QU64B6Enk/U YETQNTIwewJFsJcHt3DY5OZbbDWPBNIadPd1oA1pPZAjlYpEX8Cs6I5Ww5YvBYUZm4qe zzF81OZmwCDiyojcgBH+2WqnivHZd9sMK4F3wKNI/AXL9Dl5ziuHkCUF/Ydn/cshClrn AmlqrhdcTjJ8KrP0DL+R/JPDFMkG1UoqvZNcquM0oV1w/BQzC01bcEgmi7m1t2WAiKc5 2big== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709645290; x=1710250090; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xrMfbkn1tuU6SUPOaVeOyAcTiWbi2hvPZXXg+AE9aRo=; b=L7y1gqtiAxqtfBorGl85/cr+YNVpu1IuenD+CJZJsucFsGHaUxW4Rx7Tg9cFEYc7JW daIQ+s5TJZZGHGz+bHI1MpXfGNSLwo7+tFkk+OzvuJK9L4qDQO4JSeS96fkdOjW7yh1i qMaJ0aNirOeUiTiS5udPPhhpaRC6I3zlymk+OmEz2n3fVFf32Na5DoK5A+dJRL6BbSTd GjksrS1wecCQkzKWMTseULJTHwr7QGiFhEvyvRuzgWHaw8UhIKVGsdmwPgYohLh2gQ54 9J9Xxf+64+PNCVoKpZWuQ4zQu9TXDGTwc2OawbLxl8bVgyFsBYVpzgRVW9A466hlsnVu vf3g== X-Gm-Message-State: AOJu0YxmbORQQ7ZXkL0XLogO5nWcInrLbEH8VkQsWLjnqxlH3AtpRFyV wzfPHpL3860itbTTSuJ6k/aA0VgJ9Bb0kbZdKSsmr5QsYLyawHjuobUN1SAr X-Google-Smtp-Source: AGHT+IHCLue61+v7U0pofjnWd+LMwjNWGbQG3PQqYMJyUe7Y5qxYcGTEKdpXw2MW4d+hsJy1rYan+g== X-Received: by 2002:a17:902:e98d:b0:1dc:f833:c8ae with SMTP id f13-20020a170902e98d00b001dcf833c8aemr1779735plb.36.1709645289701; Tue, 05 Mar 2024 05:28:09 -0800 (PST) Received: from LOCLAP699.. ([50.39.172.77]) by smtp.gmail.com with ESMTPSA id 4-20020a170902e9c400b001d7252fef6bsm10489493plk.299.2024.03.05.05.28.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 05:28:09 -0800 (PST) From: James Prestwood To: ell@lists.linux.dev Cc: James Prestwood Subject: [PATCH 1/5] cert: remove usused elem_data variable Date: Tue, 5 Mar 2024 05:28:03 -0800 Message-Id: <20240305132807.85724-1-prestwoj@gmail.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: ell@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This was being set in the if block, but never used after that. Instead just check the return value directly. --- ell/cert.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ell/cert.c b/ell/cert.c index ead9cfd..38bb01a 100644 --- a/ell/cert.c +++ b/ell/cert.c @@ -1658,7 +1658,6 @@ static int cert_try_load_der_format(const uint8_t *content, size_t content_len, { const uint8_t *seq; size_t seq_len; - const uint8_t *elem_data; size_t elem_len; uint8_t tag; @@ -1674,8 +1673,7 @@ static int cert_try_load_der_format(const uint8_t *content, size_t content_len, * to add any more formats we'll probably need to start guessing * from the filename suffix. */ - if (!(elem_data = asn1_der_find_elem(seq, seq_len, - 0, &tag, &elem_len))) + if (!asn1_der_find_elem(seq, seq_len,0, &tag, &elem_len)) return -ENOMSG; if (tag == ASN1_ID_SEQUENCE) { From patchwork Tue Mar 5 13:28:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 13582393 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.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 41B6343AB0 for ; Tue, 5 Mar 2024 13:28:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709645292; cv=none; b=Zu3sn4qkDT6wDz28OwAW2EtVvpJDjNi59fQPg3Z2AmcXr771jpHT8GueLY68rANsi41FgHjj7sXq6p7UgkCVV86rzXPOlHS5OMLD6ULDdHYL9Iz+l7qmKfv/GiHBSBVcPry9sgaEqeN+U72PBg/LXHieMSaaoeISQ+ja8d685N8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709645292; c=relaxed/simple; bh=6j98bvrjC1+NNisRDXENnTK39qGosH6ABglUJuv0NdM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=aKQ7lOkNME1zzNKFJXiJZ4M/lcKd4CCE2Pq7mtCnAaEchHOL7tI8+IyRXSV1dAfPO7aKILn8QNfmQSJ5LURDGLa07/3VqYm781CYknOZu3nt7J8scoEjnumyFW5xImJzc2RHPJjU60X2a9obtEfU/FjLLCQm0S3xLGi8Cx+/nL8= 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=iQReyKDG; arc=none smtp.client-ip=209.85.214.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iQReyKDG" Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1dc1ff3ba1aso42936825ad.3 for ; Tue, 05 Mar 2024 05:28:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709645290; x=1710250090; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RtFV3wS5Erf96aY7Nr0XYLChlZBBHrnmq5Ei7fR5b94=; b=iQReyKDG+go6Q13tw+zA5u3b+9Olw67/DYR0zWbozysCi9bkV7DEBZpgc32RTrT40F 8W8ov1SdIaZMdvAQ7RMjLg7xtYIcmTVAoBik6PZedEU5OAYxrQow2nleCwSfRhsboQol 60gsS9dR+Lh4qi/bo6mUE1wCCSTzkGNXdxuZHTe43bYWshsv7GCapAsRN62FtJdMJnzM W/NPVEu6IHB1NmoT45O5t49Cl2hjahj26pmgBzlbJ8VxjKqL9oBj8V+qIKzkwh82Erb8 3VomHT/OQN0w/oKQ+xUWzooqoKw8XXaYVZyb9jIVSdHwNZwj7va1dH5/G9jPCS8SpCeJ pOlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709645290; x=1710250090; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RtFV3wS5Erf96aY7Nr0XYLChlZBBHrnmq5Ei7fR5b94=; b=RCzZ3ouGktDN2QR9xCmZ3dSoG0VlAD2TAjY/sAdzEE1UZqayZpU6AqkFHAt1OYJgrn PdgGBS7/JYakGmn1f9HI94cw48107yp7uWVa1fWKYNL2brqOYIigv9Okcz2GoDz/BccJ 7GBXW3XmBZILrL3OhX88ahElVh4+gVtLboM5c/GW/50llWO7k0Zu9YqErOum++DjcC4b uaHNdx99tbcWMZ2S3rHkys2GDuyVU0nibWad0eMqsrfEMuPCIfdpNTiDOIx8NUIbrdb4 Y1gAOyDK/1zuu04zZkpGQ+X8vWJHL765cVw1rPe6+bY2/nnfuGvV2a+PVvD9CWPK6Pdf Sawg== X-Gm-Message-State: AOJu0Yw7xVZli37/uyJNG68O6sGZAREfj/3V8Jx8KwIww+RlMCdB8vSU 4CE3AuOaUejWWT7aaYu44dm9fIamM0N7M/RU39QzezeJ6KZuE+6fNuk/MY4I X-Google-Smtp-Source: AGHT+IHrLHEnr3/YhP2Y/b9X6e+TOQZpMPDa/8iHqZx6QxlOM0sf+H3t+dQDfbJTAlkDgp6JXSo17w== X-Received: by 2002:a17:902:e544:b0:1db:7195:5fca with SMTP id n4-20020a170902e54400b001db71955fcamr2106055plf.34.1709645290219; Tue, 05 Mar 2024 05:28:10 -0800 (PST) Received: from LOCLAP699.. ([50.39.172.77]) by smtp.gmail.com with ESMTPSA id 4-20020a170902e9c400b001d7252fef6bsm10489493plk.299.2024.03.05.05.28.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 05:28:09 -0800 (PST) From: James Prestwood To: ell@lists.linux.dev Cc: James Prestwood Subject: [PATCH 2/5] dbus: remove unused 'type' variable Date: Tue, 5 Mar 2024 05:28:04 -0800 Message-Id: <20240305132807.85724-2-prestwoj@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240305132807.85724-1-prestwoj@gmail.com> References: <20240305132807.85724-1-prestwoj@gmail.com> Precedence: bulk X-Mailing-List: ell@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This was being set in the if block but never used afterwards. --- ell/dbus.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ell/dbus.c b/ell/dbus.c index 532e07b..d610532 100644 --- a/ell/dbus.c +++ b/ell/dbus.c @@ -1689,8 +1689,7 @@ LIB_EXPORT unsigned int l_dbus_add_signal_watch(struct l_dbus *dbus, va_start(args, member); rule_len = 0; - while ((type = va_arg(args, enum l_dbus_match_type)) != - L_DBUS_MATCH_NONE) + while (va_arg(args, enum l_dbus_match_type) != L_DBUS_MATCH_NONE) rule_len++; va_end(args); From patchwork Tue Mar 5 13:28:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 13582394 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (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 047B885645 for ; Tue, 5 Mar 2024 13:28:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709645293; cv=none; b=cBplH+MmdQwJfdkCc6fo4dXy7hPdS1nsIYJiEjjipmyVySWqpkNdJGbnuCV9esglfAwyvGxCA7YVYhx0wTvr7A8kb95miW5zFJa9nW+dQwL6eq+u936UrVdnxNqihTLyF9sdSTAV0JjulM/yb8A/JOf6uwH088VdgNW84TymUf4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709645293; c=relaxed/simple; bh=Tp+ANjtGrfyd7VlK+KV0wZAZbfTgmPCogOTb5Bn5iSQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=u8GKvz7KIsdrSXUimPqxLe/F+SenG21brGXLQ4z5JfJp7ba6fIkUsY69dbtbQD2EQxZhwV2AGANxlaOPdgJ14o5P2o2bTbCPioZxnnq5vMrC8gz4FLOCSChZTgikkplRrAaiG9ezEbbB0xEWvrHVf9hgX/fEwBkvVcV9mDSILCw= 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=RCblxtdA; arc=none smtp.client-ip=209.85.214.180 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RCblxtdA" Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-1dc29f1956cso44381875ad.0 for ; Tue, 05 Mar 2024 05:28:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709645291; x=1710250091; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+x/WqBrbPSzfFYVPpjZkKT07an++eB2M422wbN+o4cA=; b=RCblxtdAElfDU0Gc6Kb8254msHTcwZ3iIR3FBMQq6D0JbIuSU4RaH8GwYSeZGG3/Fb F0Mfa2dos78HW+9SThdvmrX+4eyZI7lHnimTIaNFRs00+TR6jhzC2rNtBcJcYVtU2moe FnVccjQ+pjjLWmePykt1+G2zJ5wTp7o6yjh2DXJqhVEwqkzFM2a/1/B5VvTkNCrASXMP G3rxDaan8Kso13RsWLqp5dfhv3lRknJmdu+/F8Oh+mIb0VRPcjdttlROpCqi59BizppA P6sf1+T93fXy3tDqCBk9X/i01Ted/y0RI5xEEYbX1dBfOMlZKlXfEqd0YrQq1PaLoGi8 EzPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709645291; x=1710250091; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+x/WqBrbPSzfFYVPpjZkKT07an++eB2M422wbN+o4cA=; b=m+jJbmEUYRTYXKxNHXox0MBgV/yOHcMIansIfy6RzicDELY9NVegnaEzp0DldxMwdK gEb6P22PHOQGuQ9jlub3Nu/VL3IQLeGQE1CVBXN/1N3fHCbIebY7uUUVg+4NrXZjhu0j sP51N1Y28j3iyivBWU4OPt4cts8CXR2PuXtbHv8TWQ+9O28IcWKZ9J4+L7AX2tV2xipn mc+7QdyKEqS067PILXVQ27+OndVxxdFjEogkFnciGjWeQR9hWEilyZK9VswS/4CX8VOg ZYtqV73KxnuVzEeEeu2p2VLHfJYOb/oh7rASPxDZOqtSFnkTk77GAAUkMWncW9V40O5+ P5MA== X-Gm-Message-State: AOJu0YycIDPWg777dHz3vyKZ0C8w4bg2fIjcCC4tPymPN75IHEFN0Jub 7q5/8SowilrmKi8cqXuaj7bImK3UQReDbl35HIKfD4rMWewouI1EESV7+pMN X-Google-Smtp-Source: AGHT+IFKB1J411dP+mpMzcWKA7+BVLPErjoF17ay1NSGFzOx2ZKkJZpjm8VBDcqS75P/EnEzlFB3Xw== X-Received: by 2002:a17:903:41cc:b0:1dc:abe7:a1a6 with SMTP id u12-20020a17090341cc00b001dcabe7a1a6mr1907970ple.17.1709645290783; Tue, 05 Mar 2024 05:28:10 -0800 (PST) Received: from LOCLAP699.. ([50.39.172.77]) by smtp.gmail.com with ESMTPSA id 4-20020a170902e9c400b001d7252fef6bsm10489493plk.299.2024.03.05.05.28.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 05:28:10 -0800 (PST) From: James Prestwood To: ell@lists.linux.dev Cc: James Prestwood Subject: [PATCH 3/5] gvariant-util: remove unneeded initializer Date: Tue, 5 Mar 2024 05:28:05 -0800 Message-Id: <20240305132807.85724-3-prestwoj@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240305132807.85724-1-prestwoj@gmail.com> References: <20240305132807.85724-1-prestwoj@gmail.com> Precedence: bulk X-Mailing-List: ell@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'i' is initialized inside the for loop, so remove this extra initialization prior. --- ell/gvariant-util.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ell/gvariant-util.c b/ell/gvariant-util.c index 6a695d4..6482e24 100644 --- a/ell/gvariant-util.c +++ b/ell/gvariant-util.c @@ -843,7 +843,6 @@ static void container_append_struct_offsets(struct container *container, offset_size = offset_length(builder->body_pos, container->offset_index); - i = container->offset_index - 1; start = grow_body(builder, offset_size * container->offset_index, 1); From patchwork Tue Mar 5 13:28:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 13582395 Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (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 93B1458ADC for ; Tue, 5 Mar 2024 13:28:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709645293; cv=none; b=TEPFCf5zF5yy1VTbU39pLUHB6cDKDIgk6Yg8GVWxiN7zwDPr0S3gIsmGySd5Be9EDgdv4JuzvtjUGEhVZvT72EpXmfLuvhgcXC+bD7sx8APCo2c7TTCHoVngnDU4LdmljWP2aYu7nDqA8bbiSLJ93aET+I1vSEbZoR0JjdUDO28= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709645293; c=relaxed/simple; bh=gRVG+5rEWFAd6eRUaZublcBONbEZD0u4Kr59icHF1+4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jO/Gor2Xehd8mujlowdt1V4s7hsHDmeUcr0f1XawTaLSeKBzYGyOps0f/iZY6ODEnPJLioPJRP1KwpLkJ1uCOyo4tcHHaEn8A/Lf//KWSpR+/a1XjIfW1Y8DLHx2s6Vzk+hcSMYKLvW0fiN5TbiHPAfPKVBANrR+UElRKCExMaU= 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=RtSbp56K; arc=none smtp.client-ip=209.85.214.177 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RtSbp56K" Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1dc418fa351so48426195ad.1 for ; Tue, 05 Mar 2024 05:28:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709645291; x=1710250091; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=K5XY6E+dKQAXK5icK+7YYYas90wBpH6iMsKhCSqE+wA=; b=RtSbp56KDqDC52QEodnJoGQ6R5ZPzuO21p/vdmKsxC6P4vx69mNZEsHHNNQsObx0ID NjMNCZUpTWobEjdcQH4486e5fu7PQWE/5leCmYItNQmYEo5UmPBmXZrLYF/9VYynt5Vr /tfhs/miwfb0dykirhpUb679qxwrmynSWkLchtctrHP+QPcXc9r+JA3yXyul62R8Mw0f xk4A3mGb3viLvXm8Ga2+He/jDIMUUb8SUs45RVnC2AG0xaV2rBXTZCVniTPqgGxFFpx9 lliiGZyb/ttwsQKdu6s9bTXCPuzUKQ81tCrLaJWbkvR9myZfiWOh+4//eEOHgeSVyus6 FDGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709645291; x=1710250091; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=K5XY6E+dKQAXK5icK+7YYYas90wBpH6iMsKhCSqE+wA=; b=gMBVvWWDVUGV3dU5RkiEeqQD+UTaRQX9URaS6yIaa9RRZ7TZZnTDM3Zf8OXdGg64qF ZmGppHL4pfHbBo94k1JuhMzWjsVTTtHcBI/fpoz6vMQR8smLOOtPdlg5b6j7yeUfNY7Z eQez5AAf9HYjpVns48KlcEu03ELAoGXbszFrTmU520RTirdTRWAczMRucoMsRZ59Cno9 wvta7wAuIAoZl+pMGh4o5vquLNWt60uvHs9NcZRWN/0TK0Mrrk8JkHqhgKS0dVoyEIxJ mysS4Q+X0su9DUB2rnWS2CM8mjsEsIGFU+Cilk4DnEfqKeUuVWnkCL3g+mXowSgQVut7 5klQ== X-Gm-Message-State: AOJu0Yzh1Hc+eQWjYnUwp0USLj0JKfQsFKTU/3VIogUZAWma94sSS6T7 2W/L2p7W98WPyOgKX3l4SZZHLm7XIkwHxJpkhgISTfiFSm0oRBXMrp+v6p1B X-Google-Smtp-Source: AGHT+IFOpF/cD/6O61oYjfuLeHGqd5tys6va4iYbVwcTQdqzBD/oaAVDnJxtzjuK3Bmq+/bEW+VfGQ== X-Received: by 2002:a17:902:ec8f:b0:1dc:fc84:198 with SMTP id x15-20020a170902ec8f00b001dcfc840198mr2620803plg.29.1709645291344; Tue, 05 Mar 2024 05:28:11 -0800 (PST) Received: from LOCLAP699.. ([50.39.172.77]) by smtp.gmail.com with ESMTPSA id 4-20020a170902e9c400b001d7252fef6bsm10489493plk.299.2024.03.05.05.28.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 05:28:11 -0800 (PST) From: James Prestwood To: ell@lists.linux.dev Cc: James Prestwood Subject: [PATCH 4/5] queue: remove unneeded entry advancement Date: Tue, 5 Mar 2024 05:28:06 -0800 Message-Id: <20240305132807.85724-4-prestwoj@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240305132807.85724-1-prestwoj@gmail.com> References: <20240305132807.85724-1-prestwoj@gmail.com> Precedence: bulk X-Mailing-List: ell@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 At this point the loop is over and there is no point advancing the entry pointer. --- ell/queue.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ell/queue.c b/ell/queue.c index 487a949..9018402 100644 --- a/ell/queue.c +++ b/ell/queue.c @@ -511,8 +511,6 @@ LIB_EXPORT void *l_queue_remove_if(struct l_queue *queue, if (!entry->next) queue->tail = prev; - entry = entry->next; - data = tmp->data; l_free(tmp); From patchwork Tue Mar 5 13:28:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 13582396 Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) (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 EC12143AB0 for ; Tue, 5 Mar 2024 13:28:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709645294; cv=none; b=HJ+WOkdKnNisNHgvouQfRNHH50QerG+v8JvF5/8h0haRxZvWneASQriS8hE3YBVEtOsRdpAdzHgSwi45T4TOXbSO3L91bJvKyBoJ+lxcFE1gZFWwmO98BmuX8hOb9YPsobvx8B/hy5HVvWkG9wj1z2fj8xQGddjaf65rmPDfkek= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709645294; c=relaxed/simple; bh=yCWhT5NTafTYE8AySuKCpzd30IKukbH6ryhlLhZiaK4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=KWn1oS6MyIgo4OG7LtPlMeplvoHpbTIsLjD/omCMJI+jh32tqbwtEgifvRxcaTaOOwBLDD0SLljauHZ9eCoNI6Zx/hjzYkduNBxi3YeB7v3hzyWtfkXJuw1GSSRK0OPgwnpjLt57nGr5RD46kz+2BpYaqpdaTUFzgVgObJeT2uc= 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=TyECrtNx; arc=none smtp.client-ip=209.85.215.180 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TyECrtNx" Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-5ce9555d42eso4854527a12.2 for ; Tue, 05 Mar 2024 05:28:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709645292; x=1710250092; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=F7RSJaeD29eME/PytTf73LOaZS9v5mTgYH7ZOhz1hCo=; b=TyECrtNxh/WQBMPLiLebJ5j85dVHhjvF2eAn1WV5/NV9Fnoo5O2pwkdiMwW9JoNJ/6 9IqlvQq9pqGfrITi6P24zAh6aeojtA26buZO7Q4SESxh44TKX9LL9Bm+h6i8wXnfviof N9ngnsrJ20itECJnldSz6tS48Ds+xEUtDiy2npUdJahtdvCl5yrhbkzwUWeHctJisoP1 mkjZeiI1Z4RxEC5CWFc050obbyka/c7lMRcayFxwKlr/CQGpftf8L+7iagSDfB8HTKcX m13H2CRIqJaJPej/kLMA4t9vmsfC8E0O8vk5CT+K+gQvp5xHJcU3a20S5AzM6ncXN602 PSmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709645292; x=1710250092; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=F7RSJaeD29eME/PytTf73LOaZS9v5mTgYH7ZOhz1hCo=; b=wL9a1Tg4Q9fGvnNlsfEF6F5jjJfJrJDQoStTygnX8KL6Yhhft23sDbmr8P7q18z0vL W9l9UDHij6VPkr9vr/QPr3Dl4qtXNU4XYI04NI1sDBJzRx/Fk5qCjjqrHIlmssotoEst siLUGCaTC8awgkxUgxbBlt2ZfrbvMoczTiP/kfbDfvuY2lmNk7xFw2NWLNJWkwVS42g0 YQesaKDsppYhnQlXEhkbOsh6T/BQa8eGNZ5HN8FkwazYN1/U8ftYmmBur+Taa7YCjjSQ VFZfyiZtfrm+BsAMQ0LIQ8UQFNRPd6trs9P10eu9uQ3lCU49bnKunSkS6iPKnoPi7RJr eSvA== X-Gm-Message-State: AOJu0YwddGjW6pSynUMTtkh/irAQzcj4xdzuR0pbBM/bUtlDKwPFClqk tfuFDfhZe0/vRGRVfcdzJy/h3MvQgABsZ7Q5Xyi6ElhqL123G3poFuo7ie4V X-Google-Smtp-Source: AGHT+IFjak7Yiz2LUIl37BdZ1TIB1g435n4M9xtZ7Ea+liVaNqMc3ST6U8u+DQjm4zIduF6DNQkI6w== X-Received: by 2002:a17:902:a503:b0:1dc:c59d:5dde with SMTP id s3-20020a170902a50300b001dcc59d5ddemr1900503plq.59.1709645292020; Tue, 05 Mar 2024 05:28:12 -0800 (PST) Received: from LOCLAP699.. ([50.39.172.77]) by smtp.gmail.com with ESMTPSA id 4-20020a170902e9c400b001d7252fef6bsm10489493plk.299.2024.03.05.05.28.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 05:28:11 -0800 (PST) From: James Prestwood To: ell@lists.linux.dev Cc: James Prestwood Subject: [PATCH 5/5] unit: assert return of several gvariant-util calls Date: Tue, 5 Mar 2024 05:28:07 -0800 Message-Id: <20240305132807.85724-5-prestwoj@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240305132807.85724-1-prestwoj@gmail.com> References: <20240305132807.85724-1-prestwoj@gmail.com> Precedence: bulk X-Mailing-List: ell@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Caught by clang static analysis, there were several calls where the return value was unused. --- unit/test-gvariant-util.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unit/test-gvariant-util.c b/unit/test-gvariant-util.c index 7b2e860..9a7a5df 100644 --- a/unit/test-gvariant-util.c +++ b/unit/test-gvariant-util.c @@ -644,6 +644,7 @@ static void test_iter_variant_2(const void *test_data) assert(ret); ret = _gvariant_iter_enter_struct(&variant, &structure); + assert(ret); ret = _gvariant_iter_next_entry_basic(&structure, 's', &s); assert(ret); @@ -1047,6 +1048,7 @@ static void test_iter_header_1(const void *test_data) ret = _gvariant_iter_init(&iter, NULL, "a(yv)", NULL, test->data + 16, u); + assert(ret); ret = _gvariant_iter_enter_array(&iter, &array); assert(ret); @@ -1308,6 +1310,7 @@ static void test_builder_fixed_struct_2(const void *test_data) assert(ret); ret = _gvariant_builder_append_basic(builder, 't', &t); + assert(ret); ret = _gvariant_builder_leave_struct(builder); assert(ret);