commit 22db618: [Minor] Remove redundant abs call

Vsevolod Stakhov vsevolod at highsecure.ru
Sun Jan 23 19:49:04 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-01-23 19:47:48 +0000
URL: https://github.com/rspamd/rspamd/commit/22db618165cfb1ee0f3ff808fd27603c55cf9234 (HEAD -> master)

[Minor] Remove redundant abs call

---
 src/libmime/images.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/libmime/images.c b/src/libmime/images.c
index 4e0872f38..dc34c8174 100644
--- a/src/libmime/images.c
+++ b/src/libmime/images.c
@@ -223,10 +223,10 @@ process_bmp_image (rspamd_mempool_t *pool, rspamd_ftok_t *data)
 	img->type = IMAGE_TYPE_BMP;
 	img->data = data;
 	p = data->begin + 18;
-	memcpy (&t, p,	   sizeof (gint32));
-	img->width = abs (GINT32_FROM_LE (t));
+	memcpy (&t, p, sizeof (guint32));
+	img->width = GUINT32_FROM_LE (t);
 	memcpy (&t, p + 4, sizeof (gint32));
-	img->height = abs (GINT32_FROM_LE (t));
+	img->height = GUINT32_FROM_LE (t);
 
 	return img;
 }


More information about the Commits mailing list