Skip to content

Commit b17c8c3

Browse files
kolyshkindrakenclimber
authored andcommitted
all: rm unused get_*_version impl
Commit 449387b ("all: require libseccomp >= 2.3.1") missed removing some code which is only used when building against old (< 2.3.0) libseccomp headers. Remove it. Signed-off-by: Kir Kolyshkin <[email protected]> Acked-by: Paul Moore <[email protected]> Signed-off-by: Tom Hromatka <[email protected]>
1 parent 879684a commit b17c8c3

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

seccomp_internal.go

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,6 @@ const int C_CMP_GE = (int)SCMP_CMP_GE;
145145
const int C_CMP_GT = (int)SCMP_CMP_GT;
146146
const int C_CMP_MASKED_EQ = (int)SCMP_CMP_MASKED_EQ;
147147
148-
const int C_VERSION_MAJOR = SCMP_VER_MAJOR;
149-
const int C_VERSION_MINOR = SCMP_VER_MINOR;
150-
const int C_VERSION_MICRO = SCMP_VER_MICRO;
151-
152-
#if SCMP_VER_MAJOR == 2 && SCMP_VER_MINOR >= 3
153148
unsigned int get_major_version()
154149
{
155150
return seccomp_version()->major;
@@ -164,22 +159,6 @@ unsigned int get_micro_version()
164159
{
165160
return seccomp_version()->micro;
166161
}
167-
#else
168-
unsigned int get_major_version()
169-
{
170-
return (unsigned int)C_VERSION_MAJOR;
171-
}
172-
173-
unsigned int get_minor_version()
174-
{
175-
return (unsigned int)C_VERSION_MINOR;
176-
}
177-
178-
unsigned int get_micro_version()
179-
{
180-
return (unsigned int)C_VERSION_MICRO;
181-
}
182-
#endif
183162
184163
// The libseccomp API level functions were added in v2.4.0
185164
#if SCMP_VER_MAJOR == 2 && SCMP_VER_MINOR < 4

0 commit comments

Comments
 (0)