From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id BE4BF495CA for ; Tue, 13 Feb 2024 23:05:43 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4BD2568D1E7; Wed, 14 Feb 2024 01:05:02 +0200 (EET) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C2D5268D1CC for ; Wed, 14 Feb 2024 01:04:55 +0200 (EET) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1d72f71f222so38802785ad.1 for ; Tue, 13 Feb 2024 15:04:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707865494; x=1708470294; darn=ffmpeg.org; 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=WMxXHC1Fwk2B0LVSX41Sv3JWJ2o/ZRRmp9XDyFw8loY=; b=WGzF1wIFBKsCO8qw7jFpMJbWJHs3bN/fIsHWlNrWX4uqe/RRgGTu82PliC+hfcP419 +za5t5/ZyXiSHJq51hQQiYvapAspBbeBMut8uufOuJgkG5Gdfa/n/i+Kdlf+DWHAXizo eOz4Gz08bwiNBdo+cBOmNibgGAh16TZb7b0UIxdXk782SQ4jem3yEw3kP7bWwI1pLS+M 56fs3ZntfKhHfUqqtQxuEr8x/R2h/2K1yNLO/DtvFGjQdci7x1gh/a7PeGtH2Jqxca// eXRnwyGOMCMHdURiHG9EcCYzTM6Yi/prp3SIhdTp0YlYomOzA7YL+u1GddPxqv2Hv9/8 hEeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707865494; x=1708470294; 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=WMxXHC1Fwk2B0LVSX41Sv3JWJ2o/ZRRmp9XDyFw8loY=; b=c+H1irlTY/m8inj1ObxlBqGBdkFsQQo0JMHxRQa00TJWU/FcZxm1BSLoY+8ppU6X/3 H6nNGavKQPRJBBsPCUClMG3B8UoqK5QwYKHtc1iK54Bw+3ldAyJHoSMe1rZl7gBuflYs SIyJeWGbCsMMpjlbhaCDw0uK+qzBkPjxaxpkzSK9YiCr3KCxV98c9xVYuFeCY6TYOvbc MlZLn6OkArFQeUkXFmp9hQNdIbi0a78/db93LRlUL4Bum2ZzFkekaABZYIoUFuimRJZe pgZZA8q0WC6/Ly2cMPTIgplvYFbpqF/fx2KzsuYYJCVM02D//OSEX/Oa3aYmPGOLtIIh 1poA== X-Gm-Message-State: AOJu0YyAlEouI+pNULHr2iye2QFJYOrpWm+0ICDyO8cDT7phx+IE2U5J 1dVSDwZ2Uf+YeTXV/JCF0zWJt0wka9/EJie0cv+B0gnLUqlCnYFRZZ0rX92R X-Google-Smtp-Source: AGHT+IGGqgO8p+IJLXWKLg/psHmOfpDx9zYrBsGMUZ9G0u3ctMsd7u+9k8I8PJIVwfbyB39kH/sMjg== X-Received: by 2002:a17:902:eac4:b0:1db:4b29:9b21 with SMTP id p4-20020a170902eac400b001db4b299b21mr1194615pld.23.1707865494059; Tue, 13 Feb 2024 15:04:54 -0800 (PST) Received: from localhost.localdomain (2a01cb040b6872000000000000000afa.ipv6.abo.wanadoo.fr. [2a01:cb04:b68:7200::afa]) by smtp.gmail.com with ESMTPSA id l13-20020a170903244d00b001da294ff6d5sm2580098pls.189.2024.02.13.15.04.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 15:04:53 -0800 (PST) From: Matthieu Bouron To: ffmpeg-devel@ffmpeg.org Date: Tue, 13 Feb 2024 23:50:13 +0100 Message-ID: <20240213230418.457056-6-matthieu.bouron@gmail.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240213230418.457056-1-matthieu.bouron@gmail.com> References: <20240213230418.457056-1-matthieu.bouron@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 5/7] avutil/jni: remove unnecessary NULL checks before calling DeleteLocalRef() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Matthieu Bouron Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Delete{Global,Local}Ref() already handle NULL. --- libavutil/jniutils.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/libavutil/jniutils.c b/libavutil/jniutils.c index 89623af3f8..beedf24c0d 100644 --- a/libavutil/jniutils.c +++ b/libavutil/jniutils.c @@ -236,17 +236,9 @@ done: av_free(name); av_free(message); - if (class_class) { - (*env)->DeleteLocalRef(env, class_class); - } - - if (exception_class) { - (*env)->DeleteLocalRef(env, exception_class); - } - - if (string) { - (*env)->DeleteLocalRef(env, string); - } + (*env)->DeleteLocalRef(env, class_class); + (*env)->DeleteLocalRef(env, exception_class); + (*env)->DeleteLocalRef(env, string); return ret; } -- 2.43.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".