Skip to content

Commit 1f611cb

Browse files
authored
Merge pull request #1196 from jan-cerny/unused_removal
Remove unused code
2 parents 1171255 + dea91f1 commit 1f611cb

25 files changed

+4
-1326
lines changed

src/OVAL/probes/SEAP/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ file(GLOB_RECURSE SEAP_HEADERS "*.h")
66
file(GLOB_RECURSE RBT_SOURCES "generic/rbt/*.c")
77
file(GLOB_RECURSE RBT_HEADERS "generic/rbt/*.h")
88

9-
file(GLOB_RECURSE SEAP_SOURCES_TO_REMOVE "sexp-handler.c")
10-
list(REMOVE_ITEM SEAP_SOURCES ${SEAP_SOURCES_TO_REMOVE} ${RBT_SOURCES} ${RBT_HEADERS})
9+
list(REMOVE_ITEM SEAP_SOURCES ${RBT_SOURCES} ${RBT_HEADERS})
1110

1211
if(ENABLE_PROBES)
1312
add_library(seap_object OBJECT ${SEAP_SOURCES} ${SEAP_HEADERS})

src/OVAL/probes/SEAP/generic/strbuf.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -164,31 +164,12 @@ int strbuf_addf (strbuf_t *buf, char *str, size_t len)
164164
return (ret);
165165
}
166166

167-
int strbuf_add0 (strbuf_t *buf, const char *str)
168-
{
169-
return __strbuf_add (buf, (char *)str, strlen (str));
170-
}
171-
172167
int strbuf_addc (strbuf_t *buf, char ch)
173168
{
174169
/* XXX: direct? */
175170
return __strbuf_add (buf, &ch, 1);
176171
}
177172

178-
int strbuf_add0f (strbuf_t *buf, char *str)
179-
{
180-
int ret;
181-
182-
ret = __strbuf_add (buf, str, strlen (str));
183-
184-
if (ret == 0) {
185-
free (str);
186-
return (0);
187-
}
188-
189-
return (ret);
190-
}
191-
192173
int strbuf_trunc (strbuf_t *buf, size_t len)
193174
{
194175
return (0);

src/OVAL/probes/SEAP/public/helpers.h

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/OVAL/probes/SEAP/public/seap-command.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ typedef uint8_t SEAP_cmdtype_t;
4848
#define SEAP_CMDREG_THREAD 0x00000004
4949

5050
OSCAP_API int SEAP_cmd_register (SEAP_CTX_t *ctx, SEAP_cmdcode_t code, uint32_t flags, SEAP_cmdfn_t func, ...);
51-
OSCAP_API int SEAP_cmd_unregister (SEAP_CTX_t *ctx, SEAP_cmdcode_t code);
5251

5352
#define SEAP_EXEC_LOCAL 0x01
5453
#define SEAP_EXEC_LONLY 0x02

src/OVAL/probes/SEAP/public/seap-message.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,10 @@ OSCAP_API int SEAP_msg_set (SEAP_msg_t *msg, SEXP_t *sexp);
5252
OSCAP_API void SEAP_msg_unset (SEAP_msg_t *msg);
5353
OSCAP_API SEXP_t *SEAP_msg_get (SEAP_msg_t *msg);
5454

55-
OSCAP_API SEXP_t *SEAP_msgattr_get (SEAP_msg_t *msg, const char *name);
5655
OSCAP_API int SEAP_msgattr_set (SEAP_msg_t *msg, const char *name, SEXP_t *value);
57-
OSCAP_API int SEAP_msgattr_del (SEAP_msg_t *msg, const char *name);
5856
OSCAP_API bool SEAP_msgattr_exists (SEAP_msg_t *msg, const char *name);
5957

6058
#include <stdio.h>
61-
OSCAP_API void SEAP_msg_print (FILE *fp, SEAP_msg_t *msg);
6259

6360
#ifdef __cplusplus
6461
}

src/OVAL/probes/SEAP/public/seap-scheme.h

Lines changed: 0 additions & 37 deletions
This file was deleted.

src/OVAL/probes/SEAP/public/seap.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ OSCAP_API void SEAP_CTX_init (SEAP_CTX_t *ctx);
5555
OSCAP_API void SEAP_CTX_free (SEAP_CTX_t *ctx);
5656

5757
OSCAP_API int SEAP_connect(SEAP_CTX_t *ctx);
58-
OSCAP_API int SEAP_listen (SEAP_CTX_t *ctx, int sd, uint32_t maxcli);
59-
OSCAP_API int SEAP_accept (SEAP_CTX_t *ctx, int sd);
6058

6159
OSCAP_API int SEAP_open (SEAP_CTX_t *ctx, const char *path, uint32_t flags);
6260
OSCAP_API SEXP_t *SEAP_read (SEAP_CTX_t *ctx, int sd);
@@ -67,14 +65,6 @@ OSCAP_API int SEAP_openfd (SEAP_CTX_t *ctx, int fd, uint32_t flags);
6765
OSCAP_API int SEAP_openfd2 (SEAP_CTX_t *ctx, int ifd, int ofd, uint32_t flags);
6866
OSCAP_API int SEAP_add_probe(SEAP_CTX_t *ctx, sch_queuedata_t *data);
6967

70-
OSCAP_API SEAP_msg_t *SEAP_msg_new (void);
71-
OSCAP_API void SEAP_msg_free (SEAP_msg_t *msg);
72-
OSCAP_API int SEAP_msg_set (SEAP_msg_t *msg, SEXP_t *sexp);
73-
OSCAP_API SEXP_t *SEAP_msg_get (SEAP_msg_t *msg);
74-
75-
OSCAP_API int SEAP_msgattr_set (SEAP_msg_t *msg, const char *attr, SEXP_t *value);
76-
OSCAP_API SEXP_t *SEAP_msgattr_get (SEAP_msg_t *msg, const char *name);
77-
7868
OSCAP_API int SEAP_recvsexp (SEAP_CTX_t *ctx, int sd, SEXP_t **sexp);
7969
OSCAP_API int SEAP_recvmsg (SEAP_CTX_t *ctx, int sd, SEAP_msg_t **seap_msg);
8070

src/OVAL/probes/SEAP/public/sexp-ID.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,5 @@ typedef uint64_t SEXP_ID_t;
3232
* Compute an S-exp value identifier
3333
*/
3434
OSCAP_API SEXP_ID_t SEXP_ID_v(const SEXP_t *s);
35-
OSCAP_API SEXP_ID_t SEXP_ID_v2(const SEXP_t *s);
3635

3736
#endif /* SEXP_ID_H */

src/OVAL/probes/SEAP/public/sexp-datatype.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,6 @@ typedef struct SEXP_datatypeTbl SEXP_datatypeTbl_t;
4040

4141
extern SEXP_datatypeTbl_t g_datatypes;
4242

43-
OSCAP_API /* const char *SEXP_datatype (const SEXP_t *sexp); */
44-
45-
OSCAP_API int SEXP_datatype_register (SEXP_datatypeTbl_t *t, const char *datatype);
46-
OSCAP_API /* int SEXP_datatype_unregister (void); */
47-
48-
OSCAP_API int SEXP_datatype_op (uint8_t op, const SEXP_t *sexp, void *res, ...);
49-
OSCAP_API int SEXP_datatype_op_safe (const char *datatype, uint8_t op, const SEXP_t *sexp, void *res, ...);
50-
5143
OSCAP_API SEXP_datatype_t *SEXP_datatype_new(void);
5244
OSCAP_API int SEXP_datatype_setflag(SEXP_datatype_t **dp, uint16_t flag, ...);
5345
OSCAP_API int SEXP_datatype_unsetflag(SEXP_datatype_t **dp, uint16_t flag);

src/OVAL/probes/SEAP/public/sexp-debug.h

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)