Fix compile time error building windmc, detected by gcc 11.
PR 26698 * windmc.c (mc_unify_path): Fix typo checking character at end of pathname.
This commit is contained in:
parent
f9b1d75e91
commit
1f1845d435
@ -1,3 +1,9 @@
|
|||||||
|
2020-10-05 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
PR 26698
|
||||||
|
* windmc.c (mc_unify_path): Fix typo checking character at end of
|
||||||
|
pathname.
|
||||||
|
|
||||||
2020-10-05 Samanta Navarro <ferivoz@riseup.net>
|
2020-10-05 Samanta Navarro <ferivoz@riseup.net>
|
||||||
|
|
||||||
* doc/binutils.texi: Fix spelling mistakes.
|
* doc/binutils.texi: Fix spelling mistakes.
|
||||||
|
@ -924,7 +924,7 @@ mc_unify_path (const char *path)
|
|||||||
hsz = xmalloc (strlen (path) + 2);
|
hsz = xmalloc (strlen (path) + 2);
|
||||||
strcpy (hsz, path);
|
strcpy (hsz, path);
|
||||||
end = hsz + strlen (hsz);
|
end = hsz + strlen (hsz);
|
||||||
if (hsz[-1] != '/' && hsz[-1] != '\\')
|
if (end[-1] != '/' && end[-1] != '\\')
|
||||||
strcpy (end, "/");
|
strcpy (end, "/");
|
||||||
while ((end = strchr (hsz, '\\')) != NULL)
|
while ((end = strchr (hsz, '\\')) != NULL)
|
||||||
*end = '/';
|
*end = '/';
|
||||||
|
Loading…
Reference in New Issue
Block a user