# HG changeset patch # User Jim Meyering # Date 973611315 0 # Node ID 8d2c63fa3a16c023e0629e9b96c42ee7998ca858 # Parent ea4fddd68bd19ecb75fd92ee2192c6aa7a79a86f (setusershell): Use rewind rather than fseek/fseeko, to avoid configuration hassles with fseeko. Don't bother opening SHELLS_FILE if shellstream is NULL; it's not necessary. diff --git a/lib/getusershell.c b/lib/getusershell.c --- a/lib/getusershell.c +++ b/lib/getusershell.c @@ -100,16 +100,8 @@ setusershell () { default_index = 0; - if (shellstream == NULL) - shellstream = fopen (SHELLS_FILE, "r"); - else - { -#ifdef HAVE_FSEEKO - fseeko (shellstream, 0, 0); -#else - fseek (shellstream, 0L, 0); -#endif - } + if (shellstream) + rewind (shellstream); } /* Close the shells file. */