From: Zackery Spytz <zspytz@gmail.com>
Date: Wed, 28 Aug 2019 21:54:02 +0000 (-0600)
Subject: bpo-23878: Remove an unneeded fseek() call in _Py_FindEnvConfigValue() (GH-15424)
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e4a5e9b5bb69025eb879cb133259667241d61a1f;p=python

bpo-23878: Remove an unneeded fseek() call in _Py_FindEnvConfigValue() (GH-15424)
---

diff --git a/Python/pathconfig.c b/Python/pathconfig.c
index 79ec4af00d..ee22061135 100644
--- a/Python/pathconfig.c
+++ b/Python/pathconfig.c
@@ -741,7 +741,6 @@ _Py_FindEnvConfigValue(FILE *env_file, const wchar_t *key,
     char buffer[MAXPATHLEN * 2 + 1];  /* allow extra for key, '=', etc. */
     buffer[Py_ARRAY_LENGTH(buffer)-1] = '\0';
 
-    fseek(env_file, 0, SEEK_SET);
     while (!feof(env_file)) {
         char * p = fgets(buffer, Py_ARRAY_LENGTH(buffer) - 1, env_file);