final set of ANSI C changes

This commit is contained in:
Chet Ramey
2023-01-05 15:09:06 -05:00
parent 5b512e1121
commit 2e725f7346
84 changed files with 390 additions and 347 deletions
+4 -3
View File
@@ -1,6 +1,6 @@
/* pathphys.c -- return pathname with all symlinks expanded. */
/* Copyright (C) 2000-2020,2022 Free Software Foundation, Inc.
/* Copyright (C) 2000-2020,2022-2023 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -49,7 +49,7 @@ extern int errno;
extern char *get_working_directory (char *);
static inline int
_path_readlink (char *path, char *buf, int bufsiz)
_path_readlink (char *path, char *buf, size_t bufsiz)
{
#ifdef HAVE_READLINK
return readlink (path, buf, bufsiz);
@@ -73,7 +73,8 @@ sh_physpath (char *path, int flags)
{
char tbuf[PATH_MAX+1], linkbuf[PATH_MAX+1];
char *result, *p, *q, *qsave, *qbase, *workpath;
int double_slash_path, linklen, nlink;
int double_slash_path, nlink;
size_t linklen;
linklen = strlen (path);