mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
Move hwlm literal len define
This commit is contained in:
parent
293f9fcc49
commit
9c538a7522
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2016, Intel Corporation
|
||||
* Copyright (c) 2015-2017, Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@ -71,6 +71,9 @@ typedef hwlm_group_t hwlmcb_rv_t;
|
||||
* designed for a different architecture). */
|
||||
#define HWLM_ERROR_UNKNOWN 2
|
||||
|
||||
/** \brief Max length of the literal passed to HWLM. */
|
||||
#define HWLM_LITERAL_MAX_LEN 8
|
||||
|
||||
struct hs_scratch;
|
||||
struct HWLM;
|
||||
|
||||
|
@ -42,9 +42,6 @@
|
||||
|
||||
namespace ue2 {
|
||||
|
||||
/** \brief Max length of the literal passed to HWLM. */
|
||||
#define HWLM_LITERAL_MAX_LEN 8
|
||||
|
||||
/** \brief Max length of the hwlmLiteral::msk and hwlmLiteral::cmp vectors. */
|
||||
#define HWLM_MASKLEN 8
|
||||
|
||||
|
@ -380,7 +380,8 @@ hwlm_error_t noodExecStreaming(const struct noodTable *n, const u8 *hbuf,
|
||||
if (hlen) {
|
||||
assert(hbuf);
|
||||
|
||||
u8 ALIGN_DIRECTIVE temp_buf[16]; // HWLM_LITERAL_MAX_LEN * 2
|
||||
u8 ALIGN_DIRECTIVE temp_buf[HWLM_LITERAL_MAX_LEN * 2];
|
||||
memset(temp_buf, 0, sizeof(temp_buf));
|
||||
|
||||
size_t tl1 = MIN(n->len - 1, hlen);
|
||||
size_t tl2 = MIN(n->len - 1, len);
|
||||
|
Loading…
x
Reference in New Issue
Block a user