Mercurial > hg > octave-kai > gnulib-hg
changeset 4331:1d4f08d8d476
(addext): Use assignment rather than cast, to avoid warnings on some
platforms.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Wed, 28 May 2003 23:31:00 +0000 |
parents | 3cfdb8b2e8fb |
children | b459be4ef089 |
files | lib/addext.c |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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