]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Remove redundant abs call
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 23 Jan 2022 19:47:48 +0000 (19:47 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 23 Jan 2022 19:47:48 +0000 (19:47 +0000)
src/libmime/images.c

index 4e0872f389f5dd76ba1bf537bcc9e2f679c5c06a..dc34c8174df4144813ade18df844cd850630f563 100644 (file)
@@ -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;
 }