From 2b57e47d420e9e942e27ca4bdb7b55728046c2b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20Ate=C5=9F=20UZUN?= Date: Sun, 12 May 2024 22:17:14 +0300 Subject: [PATCH] crypto: fix duplicated switch-case return values PR-URL: https://github.com/nodejs/node/pull/49030 Reviewed-By: Filip Skokan Reviewed-By: Luigi Pinca --- lib/internal/crypto/util.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/internal/crypto/util.js b/lib/internal/crypto/util.js index 368b1bc012eff0..d0f7e898d3495c 100644 --- a/lib/internal/crypto/util.js +++ b/lib/internal/crypto/util.js @@ -510,10 +510,14 @@ function getUsagesUnion(usageSet, ...usages) { function getBlockSize(name) { switch (name) { - case 'SHA-1': return 512; - case 'SHA-256': return 512; - case 'SHA-384': return 1024; - case 'SHA-512': return 1024; + case 'SHA-1': + // Fall through + case 'SHA-256': + return 512; + case 'SHA-384': + // Fall through + case 'SHA-512': + return 1024; } }