From b1d7cc6495c541cdd99399b4d1a835997376dcbf Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 22 Aug 2022 23:42:33 -0700
Subject: [PATCH] strpbrk_s: Remove unused variable len

Fixes
error: variable 'len' set but not used [-Werror,-Wunused-but-set-variable]

Upstream-Status: Submitted [https://github.com/rurban/safeclib/pull/123]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 src/extstr/strpbrk_s.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/extstr/strpbrk_s.c b/src/extstr/strpbrk_s.c
index 5bb7a0f8..2cf8a8be 100644
--- a/src/extstr/strpbrk_s.c
+++ b/src/extstr/strpbrk_s.c
@@ -79,7 +79,6 @@ EXPORT errno_t _strpbrk_s_chk(char *dest, rsize_t dmax, char *src, rsize_t slen,
 #endif
 {
     char *ps;
-    rsize_t len;
 
     CHK_SRC_NULL("strpbrk_s", firstp)
     *firstp = NULL;
@@ -121,7 +120,6 @@ EXPORT errno_t _strpbrk_s_chk(char *dest, rsize_t dmax, char *src, rsize_t slen,
     while (*dest && dmax) {
 
         ps = src;
-        len = slen;
         while (*ps) {
 
             /* check for a match with the substring */
@@ -130,7 +128,6 @@ EXPORT errno_t _strpbrk_s_chk(char *dest, rsize_t dmax, char *src, rsize_t slen,
                 return RCNEGATE(EOK);
             }
             ps++;
-            len--;
         }
         dest++;
         dmax--;
