# HG changeset patch # User Paul Eggert # Date 1054164660 0 # Node ID 1d4f08d8d476f19a7bbc499986fac6b7c1e430d2 # Parent 3cfdb8b2e8fb989b2f8df52fa28419b0ddd72228 (addext): Use assignment rather than cast, to avoid warnings on some platforms. diff --git a/lib/addext.c b/lib/addext.c --- 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 @@ *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