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 B9BDC4A397 for ; Wed, 27 Mar 2024 11:27:38 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C498668D5D8; Wed, 27 Mar 2024 13:27:35 +0200 (EET) Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 13FB068D4F3 for ; Wed, 27 Mar 2024 13:27:29 +0200 (EET) Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a4715d4c2cbso838830266b.1 for ; Wed, 27 Mar 2024 04:27:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711538847; x=1712143647; darn=ffmpeg.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=Ga4MESMzGDOl6iTr1dIqphBBUYGZ8M8To0fhXqHQ+Fg=; b=a2CKtvBZQozfxfWG/1ySOiU+b6zZuCA4k5h6Jr3W4gIAFlrhV54DC/A2NOuJn7UA5F 9oOwobQ099j3r2BRcXbzsR/idPtEl9+dOvrCXiGxIKt6KeIyDNfvqXx6Wvy03m5Od6fK 53zDpezd5UJ+RywY+N2EW+aY3vtigwItGydtsVrnZJwPSO/HmIHbr0CqbiJIn4qkUltf V1PCw1wt/fEOrN7gg65q1HSFOSkFJfujR1P3KtRUISpoy3A+/w30K4aA7lvZZk9FoZuP jJiuU40taWqnn+NN3qMxSSPzPYkAcRxuEqvA26zRDyanSL6l0Cpr/mZ05BbZCLMooxI1 Habg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711538847; x=1712143647; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Ga4MESMzGDOl6iTr1dIqphBBUYGZ8M8To0fhXqHQ+Fg=; b=U1wuXvUdooBiLJaszeK10pLdA7u/evh5x7sEg5Gfi9YcL2elP0sDpKu9MQExUWpbza WDCSWxfiI7Nu6lZZ3Ed85FbuQ7dh7hrfuQ1egviGpfC6KiJGPTNHnKB+m6eqsEZxmkzY n76/JElyrtZvANYsk5Su9YPpV0QbS2MDidTQ/bi/tBn3tCeIPuIM1vdPTH86VavKRKDt jJUt6NCxnqwmU6LkPGtFF04eeZUOLgE0Ly7mH8GDr9PApn4q8E0MZ0oIYOdVf4sjez+i T502aC225VOWt68FQcE59RASYYOvtS4btkxuSGFqN8g4mxZfwHseIkqxOvhDywi87zAk zc8A== X-Gm-Message-State: AOJu0Yx9r38HnuMfsxbAHpEgtB5aS79hgZ/p9203LRTuieyY5agUDgA1 XL6ERzYn+16EAA+OVES+tTJJkHuqyNkWipZBiaLMxPuaj05nIqzNA/AVE58i X-Google-Smtp-Source: AGHT+IFyNrasxpNDV0AJpndv2uxx90nVS1Qk4V++22dX/r7ubylXHv9SqBUfbcOXaBLJxMNJ0Mt93g== X-Received: by 2002:a17:907:7ea7:b0:a47:31c8:81f5 with SMTP id qb39-20020a1709077ea700b00a4731c881f5mr3527227ejc.47.1711538846696; Wed, 27 Mar 2024 04:27:26 -0700 (PDT) Received: from mariano (net-93-70-84-101.cust.vodafonedsl.it. [93.70.84.101]) by smtp.gmail.com with ESMTPSA id e12-20020a170906504c00b00a46ab33f970sm5274938ejk.163.2024.03.27.04.27.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 04:27:26 -0700 (PDT) Received: by mariano (Postfix, from userid 1000) id 90E2CBFCE0; Wed, 27 Mar 2024 12:27:24 +0100 (CET) Date: Wed, 27 Mar 2024 12:27:24 +0100 From: Stefano Sabatini To: FFmpeg development discussions and patches Message-ID: Mail-Followup-To: FFmpeg development discussions and patches , Marth64 References: <20240326201749.1543553-1-marth64@proxyid.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240326201749.1543553-1-marth64@proxyid.net> User-Agent: Mutt/2.1.4 (2021-12-11) Subject: Re: [FFmpeg-devel] [PATCH] avformat/dvdvideodec: remove `if ((ret = ...) < 0)` pattern 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: Marth64 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: On date Tuesday 2024-03-26 15:17:49 -0500, Marth64 wrote: > Recent advice plus my own experience agree that this pattern > is error-prone. Instead, set `ret` in its own line and do > the error validation after. Also, explicitly return 0 on success > in dvdvideo_chapters_setup_preindex() Not super convinced this is really useful (it's increasing the line count and therefore decreasing readability), but will apply. _______________________________________________ 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".