all: minor cleanups

This commit is contained in:
Markus F.X.J. Oberhumer
2024-05-28 10:26:39 +02:00
parent b0ce072370
commit 3495d1affd
17 changed files with 136 additions and 113 deletions
-2
View File
@@ -28,8 +28,6 @@
#include "../conf.h"
#include "../filter.h"
static unsigned umin(const unsigned a, const unsigned b) { return (a <= b) ? a : b; }
#define set_dummy(p, v) ((void) 0)
#define get_8(p) (*(p))
#define set_8(p, v) (*(p) = (v))
+2 -2
View File
@@ -44,7 +44,7 @@ static int F(Filter *f) {
// scan
const byte *b = f->buf;
#endif
const unsigned size = umin(f->buf_len, 0u - (~0u << (32 - (6 + W_CTO))));
const unsigned size = upx::umin(f->buf_len, 0u - (~0u << (32 - (6 + W_CTO))));
const unsigned size4 = size - 4;
unsigned ic;
@@ -123,7 +123,7 @@ static int F(Filter *f) {
#ifdef U
static int U(Filter *f) {
byte *b = f->buf;
const unsigned size4 = umin(f->buf_len - 4, 0u - (~0u << (32 - (6 + W_CTO))));
const unsigned size4 = upx::umin(f->buf_len - 4, 0u - (~0u << (32 - (6 + W_CTO))));
const unsigned addvalue = f->addvalue;
unsigned ic;