]> granicus.if.org Git - python/commitdiff
bpo-23878: Remove an unneeded fseek() call in _Py_FindEnvConfigValue() (GH-15424)
authorZackery Spytz <zspytz@gmail.com>
Wed, 28 Aug 2019 21:54:02 +0000 (15:54 -0600)
committerVictor Stinner <vstinner@redhat.com>
Wed, 28 Aug 2019 21:54:02 +0000 (23:54 +0200)
Python/pathconfig.c

index 79ec4af00d83baa5c1ab5212863a6088680ca0c9..ee220611357e4f8c77c856be02b8b1302145e227 100644 (file)
@@ -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);