From 5367c71c34806148b1b80dabfdb401f6090749fa Mon Sep 17 00:00:00 2001 From: Andrew Haynes Date: Thu, 16 Jul 2026 04:32:34 -0400 Subject: [PATCH] fixed unncessary calls --- .DS_Store | Bin 8196 -> 8196 bytes include/image/transformations.h | 2 +- src/transformations.c | 7 ++++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.DS_Store b/.DS_Store index 7192c57822e5a5cd178f6eb2d8d730a032b5b52f..1ab732477a337bebe162b2b5d76801d5bea05942 100644 GIT binary patch delta 519 zcmZp1XmOa}FDlN!z`)4BAi%(o!H}AhZWx@LpIfjoaWVU5b`BPfdXO|5gC0XNLn06( zDFKQDfnW%bK#|YQcX3I|$xi}`b4>oM!?O1NaYsxwDFoFNWPqH)m0JMR3Q8{oWdXV;ogtH<1lg_xlbIJ*GM@n1g(Q!#2b(;^4u};3!4p9CureeulmgApVMu`m z21uBJ>AfA0j6;$}w%j&s(^p*vu;nN!5Y}T?f$RVV=77n~0*Xw$M>j7MFlS~m`Zf8! tu$U^}7Qv%Xe=#!@GZZl-=jJ1fh00Er5;5JFx`AmkyTmsZQnajP0sx=*fjs~K delta 181 zcmZp1XmOa}&&kigz`)4BAi%IOW;Of72A0k294s8NAW;?uJ%)6KOoo!2bi?4}{M-Vd z7=wVnr}5+s0ut=Lu`){(cORd8UO*DgelH-!6euvcTTqdSXVvC)g67P&`WZk?%nZd0 yMGVQg`7SO=Ir&LI5e|bEsT=aUk2@mErl8ACRuVPc?9a1 #include "image/transformations.h" +#include + unsigned int* ppm_flip_h(const unsigned int* buf, const PPM img) { @@ -45,9 +46,9 @@ ppm_flip_v(const unsigned int* buf, const PPM img) } unsigned int* -u32_rotate(const unsigned int* buf, PPM* m_img, const int len) +u32_rotate(const unsigned int* buf, PPM* m_img) { - unsigned int* mask = malloc(len * sizeof(unsigned int)); + unsigned int* mask = malloc(m_img->len * sizeof(unsigned int)); int old_width = m_img->width; int old_height = m_img->height; for (int row = 0; row < old_height; row++)