[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b
Török Edvin
edwin at clamav.net
Sun Apr 4 00:58:22 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 30188fccb9cc711afe7ba18677f9dedcab47dfa9
Author: Török Edvin <edwin at clamav.net>
Date: Fri Jul 10 16:11:54 2009 +0300
constify
diff --git a/libclamav/bytecode.c b/libclamav/bytecode.c
index 3a775fa..a97cf8c 100644
--- a/libclamav/bytecode.c
+++ b/libclamav/bytecode.c
@@ -55,10 +55,10 @@ int cli_bytecode_context_clear(struct cli_bc_ctx *ctx)
return CL_SUCCESS;
}
-int cli_bytecode_context_setfuncid(struct cli_bc_ctx *ctx, struct cli_bc *bc, unsigned funcid)
+int cli_bytecode_context_setfuncid(struct cli_bc_ctx *ctx, const struct cli_bc *bc, unsigned funcid)
{
unsigned i;
- struct cli_bc_func *func;
+ const struct cli_bc_func *func;
if (funcid >= bc->num_func) {
cli_errmsg("bytecode: function ID doesn't exist: %u\n", funcid);
return CL_EARG;
@@ -275,7 +275,7 @@ static int parseHeader(struct cli_bc *bc, unsigned char *buffer)
unsigned magic2;
char ok = 1;
unsigned offset, len, flevel;
- if (strncmp(buffer, BC_HEADER, sizeof(BC_HEADER)-1)) {
+ if (strncmp((const char*)buffer, BC_HEADER, sizeof(BC_HEADER)-1)) {
cli_errmsg("Missing file magic in bytecode");
return CL_EMALFDB;
}
@@ -613,7 +613,7 @@ int cli_bytecode_load(struct cli_bc *bc, FILE *f, struct cli_dbio *dbio)
return CL_SUCCESS;
}
-int cli_bytecode_run(struct cli_bc *bc, struct cli_bc_ctx *ctx)
+int cli_bytecode_run(const struct cli_bc *bc, struct cli_bc_ctx *ctx)
{
struct cli_bc_inst inst;
struct cli_bc_func func;
diff --git a/libclamav/bytecode.h b/libclamav/bytecode.h
index 8e04bde..da6606b 100644
--- a/libclamav/bytecode.h
+++ b/libclamav/bytecode.h
@@ -40,7 +40,7 @@ struct cli_bc {
};
struct cli_bc_ctx *cli_bytecode_context_alloc(void);
-int cli_bytecode_context_setfuncid(struct cli_bc_ctx *ctx, struct cli_bc *bc, unsigned funcid);
+int cli_bytecode_context_setfuncid(struct cli_bc_ctx *ctx, const struct cli_bc *bc, unsigned funcid);
int cli_bytecode_context_setparam_int(struct cli_bc_ctx *ctx, unsigned i, uint64_t c);
int cli_bytecode_context_setparam_ptr(struct cli_bc_ctx *ctx, unsigned i, void *data, unsigned datalen);
int cli_bytecode_context_clear(struct cli_bc_ctx *ctx);
@@ -48,7 +48,7 @@ uint64_t cli_bytecode_context_getresult_int(struct cli_bc_ctx *ctx);
void cli_bytecode_context_destroy(struct cli_bc_ctx *ctx);
int cli_bytecode_load(struct cli_bc *bc, FILE *f, struct cli_dbio *dbio);
-int cli_bytecode_run(struct cli_bc *bc, struct cli_bc_ctx *ctx);
+int cli_bytecode_run(const struct cli_bc *bc, struct cli_bc_ctx *ctx);
void cli_bytecode_destroy(struct cli_bc *bc);
#endif
diff --git a/libclamav/bytecode_priv.h b/libclamav/bytecode_priv.h
index b8c5d5c..7f58ec5 100644
--- a/libclamav/bytecode_priv.h
+++ b/libclamav/bytecode_priv.h
@@ -86,8 +86,8 @@ struct cli_bc_func {
struct cli_bc_ctx {
/* id and params of toplevel function called */
- struct cli_bc *bc;
- struct cli_bc_func *func;
+ const struct cli_bc *bc;
+ const struct cli_bc_func *func;
struct cli_bc_value *values;
operand_t *operands;
uint16_t funcid;
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list