mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
cppcheck: can add const on some params
This commit is contained in:
parent
0a19c3e891
commit
048291dcb3
4 changed files with 5 additions and 5 deletions
|
@ -306,7 +306,7 @@ static nxp_cardtype_t getCardType(uint8_t major, uint8_t minor) {
|
|||
}
|
||||
|
||||
// ref: https://www.nxp.com/docs/en/application-note/AN12343.pdf p7
|
||||
static nxp_producttype_t getProductType(uint8_t *versionhw) {
|
||||
static nxp_producttype_t getProductType(const uint8_t *versionhw) {
|
||||
|
||||
uint8_t product = versionhw[2];
|
||||
|
||||
|
@ -323,7 +323,7 @@ static nxp_producttype_t getProductType(uint8_t *versionhw) {
|
|||
return DESFIRE_UNKNOWN_PROD;
|
||||
}
|
||||
|
||||
static const char *getProductTypeStr(uint8_t *versionhw) {
|
||||
static const char *getProductTypeStr(const uint8_t *versionhw) {
|
||||
|
||||
uint8_t product = versionhw[2];
|
||||
|
||||
|
|
|
@ -292,7 +292,7 @@ static bool topaz_byte_is_locked(uint16_t byteno) {
|
|||
}
|
||||
}
|
||||
|
||||
static int topaz_set_cc_dynamic(uint8_t *data) {
|
||||
static int topaz_set_cc_dynamic(const uint8_t *data) {
|
||||
|
||||
if (data[0] != 0xE1) {
|
||||
topaz_tag.size = TOPAZ_STATIC_MEMORY;
|
||||
|
|
|
@ -1247,7 +1247,7 @@ inline uint64_t leadingzeros64(uint64_t a) {
|
|||
}
|
||||
|
||||
|
||||
int byte_strstr(uint8_t *src, size_t srclen, uint8_t *pattern, size_t plen) {
|
||||
int byte_strstr(const uint8_t *src, size_t srclen, const uint8_t *pattern, size_t plen) {
|
||||
|
||||
size_t max = srclen - plen + 1;
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ uint64_t bitcount64(uint64_t a);
|
|||
uint32_t leadingzeros32(uint32_t a);
|
||||
uint64_t leadingzeros64(uint64_t a);
|
||||
|
||||
int byte_strstr(uint8_t *src, size_t srclen, uint8_t *pattern, size_t plen);
|
||||
int byte_strstr(const uint8_t *src, size_t srclen, const uint8_t *pattern, size_t plen);
|
||||
|
||||
struct smartbuf {
|
||||
char *ptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue