From f8a775ca130902568ae515cccb4bf554a707f703 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 28 May 2003 23:31:00 +0000 Subject: [PATCH] (addext): Use assignment rather than cast, to avoid warnings on some platforms. --- lib/addext.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/addext.c b/lib/addext.c index 571e3c2db4..a69c1748de 100644 --- a/lib/addext.c +++ b/lib/addext.c @@ -1,5 +1,7 @@ /* addext.c -- add an extension to a file name - Copyright 1990, 1997, 1998, 1999, 2001 Free Software Foundation, Inc. + + Copyright (C) 1990, 1997, 1998, 1999, 2001, 2003 Free Software + Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -83,7 +85,11 @@ addext (char *filename, char const *ext, int e) *s = c; } if (0 <= name_max || errno == 0) - slen_max = name_max == (size_t) name_max ? name_max : -1; + { + long size = slen_max = name_max; + if (name_max != size) + slen_max = -1; + } } #endif -- 2.30.2