diff options
author | Jan Beulich <jbeulich@suse.com> | 2025-04-04 10:20:31 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2025-04-04 10:20:31 +0200 |
commit | cc0693d394692261e03651325c9ae986ae579296 (patch) | |
tree | cd8191936325853a301a09b479e7211f74a152b6 /binutils/objcopy.c | |
parent | 25a0668a95ea5fac9393149205aa8f137da1c362 (diff) | |
download | binutils-cc0693d394692261e03651325c9ae986ae579296.zip binutils-cc0693d394692261e03651325c9ae986ae579296.tar.gz binutils-cc0693d394692261e03651325c9ae986ae579296.tar.bz2 |
ar/objcopy: harmonize .exe suffix stripping
With it only being the tail of the name which wants checking, using
lbasename() isn't helpful. Mirror what objcopy.c:main() does to ar.c,
merely chaning the plain int of the local variable to size_t.
Diffstat (limited to 'binutils/objcopy.c')
-rw-r--r-- | binutils/objcopy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 1cc4fe4..5b4fa7c 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -6227,7 +6227,8 @@ main (int argc, char *argv[]) #ifndef is_strip if (is_strip < 0) { - int i = strlen (program_name); + size_t i = strlen (program_name); + #ifdef HAVE_DOS_BASED_FILE_SYSTEM /* Drop the .exe suffix, if any. */ if (i > 4 && FILENAME_CMP (program_name + i - 4, ".exe") == 0) |