mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 22:35:10 +00:00
Restrict-qualify stat_multiarch
This commit is contained in:
@@ -242,7 +242,7 @@ sudo_dso_public int sudo_mmap_protect_v1(void *ptr);
|
|||||||
#define sudo_mmap_protect(_a) sudo_mmap_protect_v1(_a)
|
#define sudo_mmap_protect(_a) sudo_mmap_protect_v1(_a)
|
||||||
|
|
||||||
/* multiarch.c */
|
/* multiarch.c */
|
||||||
sudo_dso_public char *sudo_stat_multiarch_v1(const char *path, struct stat *sb);
|
sudo_dso_public char *sudo_stat_multiarch_v1(const char * restrict path, struct stat * restrict sb);
|
||||||
#define sudo_stat_multiarch(_a, _b) sudo_stat_multiarch_v1((_a), (_b))
|
#define sudo_stat_multiarch(_a, _b) sudo_stat_multiarch_v1((_a), (_b))
|
||||||
|
|
||||||
/* parseln.c */
|
/* parseln.c */
|
||||||
|
@@ -44,7 +44,7 @@
|
|||||||
* Returns a dynamically allocated string on success and NULL on failure.
|
* Returns a dynamically allocated string on success and NULL on failure.
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
sudo_stat_multiarch_v1(const char *path, struct stat *sb)
|
sudo_stat_multiarch_v1(const char * restrict path, struct stat * restrict sb)
|
||||||
{
|
{
|
||||||
# if defined(__ILP32__)
|
# if defined(__ILP32__)
|
||||||
const char *libdirs[] = { "/libx32/", "/lib/", "/libexec/", NULL };
|
const char *libdirs[] = { "/libx32/", "/lib/", "/libexec/", NULL };
|
||||||
@@ -96,7 +96,7 @@ sudo_stat_multiarch_v1(const char *path, struct stat *sb)
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
char *
|
char *
|
||||||
sudo_stat_multiarch_v1(const char *path, struct stat *sb)
|
sudo_stat_multiarch_v1(const char * restrict path, struct stat * restrict sb)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user