[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/4] remove unused mock functions
From: |
Pavel Simovec |
Subject: |
[PATCH 3/4] remove unused mock functions |
Date: |
Wed, 24 Jan 2024 13:06:53 +0100 |
---
test/test_group.c | 22 ----------------------
test/test_passwd.c | 22 ----------------------
2 files changed, 44 deletions(-)
diff --git a/test/test_group.c b/test/test_group.c
index 96dd612..0978e7f 100644
--- a/test/test_group.c
+++ b/test/test_group.c
@@ -129,17 +129,6 @@ int getgrnam_r(const char *name, struct group *grp, char
*buf, size_t buflen,
return test_getgr_match(grp, buf, buflen, result, match_name, name);
}
-EXPORT
-struct group *getgrnam(const char *name)
-{
- static char buf[16384];
- static struct group grp;
- struct group *result;
-
- (void) getgrnam_r(name, &grp, buf, sizeof(buf), &result);
- return result;
-}
-
static int match_gid(const struct group *grp, const void *data)
{
gid_t gid = *(gid_t *)data;
@@ -152,14 +141,3 @@ int getgrgid_r(gid_t gid, struct group *grp, char *buf,
size_t buflen,
{
return test_getgr_match(grp, buf, buflen, result, match_gid, &gid);
}
-
-EXPORT
-struct group *getgrgid(gid_t gid)
-{
- static char buf[16384];
- static struct group grp;
- struct group *result;
-
- (void) getgrgid_r(gid, &grp, buf, sizeof(buf), &result);
- return result;
-}
diff --git a/test/test_passwd.c b/test/test_passwd.c
index b88ea45..32f56fb 100644
--- a/test/test_passwd.c
+++ b/test/test_passwd.c
@@ -122,17 +122,6 @@ int getpwnam_r(const char *name, struct passwd *pwd, char
*buf, size_t buflen,
return test_getpw_match(pwd, buf, buflen, result, match_name, name);
}
-EXPORT
-struct passwd *getpwnam(const char *name)
-{
- static char buf[16384];
- static struct passwd pwd;
- struct passwd *result;
-
- (void) getpwnam_r(name, &pwd, buf, sizeof(buf), &result);
- return result;
-}
-
static int match_uid(const struct passwd *pwd, const void *data)
{
uid_t uid = *(uid_t *)data;
@@ -145,14 +134,3 @@ int getpwuid_r(uid_t uid, struct passwd *pwd, char *buf,
size_t buflen,
{
return test_getpw_match(pwd, buf, buflen, result, match_uid, &uid);
}
-
-EXPORT
-struct passwd *getpwuid(uid_t uid)
-{
- static char buf[16384];
- static struct passwd pwd;
- struct passwd *result;
-
- (void) getpwuid_r(uid, &pwd, buf, sizeof(buf), &result);
- return result;
-}
--
2.43.0