X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fposixtm.c;h=85936f3c6b1fe0238b53e45381f57ae146ed44db;hb=7c3f8da8f075e3813ced160d5b53a28c6f7dfe78;hp=402d59a1b3b764bf140f15376aec9459d7d2e763;hpb=46fdc6d9ea0c23ee111f27294a3a89037f26f265;p=gnulib.git diff --git a/lib/posixtm.c b/lib/posixtm.c index 402d59a1b..85936f3c6 100644 --- a/lib/posixtm.c +++ b/lib/posixtm.c @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Yacc-based version written by Jim Kingdon and David MacKenzie. Rewritten by Jim Meyering. */ @@ -193,18 +193,18 @@ posix_time_parse (struct tm *tm, const char *s, unsigned int syntax_bits) bool posixtime (time_t *p, const char *s, unsigned int syntax_bits) { - struct tm tm0; - struct tm tm1; - struct tm const *tm; - time_t t; - + struct tm tm0 #ifdef lint /* Placate gcc-4's -Wuninitialized. - posix_time_parse fails to set tm0.tm_year only when it returns + posix_time_parse fails to set all of tm0 only when it returns nonzero (due to year() returning nonzero), and in that case, this code doesn't use the tm0 at all. */ - tm0.tm_year = 0; + = { 0, } #endif + ; + struct tm tm1; + struct tm const *tm; + time_t t; if (posix_time_parse (&tm0, s, syntax_bits)) return false;