gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master 366a876: Fix error message in src/convolve/con


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 366a876: Fix error message in src/convolve/convolve.c
Date: Sat, 30 Jul 2016 10:09:28 +0000 (UTC)

branch: master
commit 366a8766693e8e8b2781582272f0d59d4ebb9df3
Author: Vladimir Markelov <address@hidden>
Commit: Vladimir Markelov <address@hidden>

    Fix error message in src/convolve/convolve.c
    
    Fix amount of memory that the application failed to allocate. And
    make both lines shorter than 75 characters.
    
    This fixed #48657
---
 src/convolve/convolve.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/convolve/convolve.c b/src/convolve/convolve.c
index b47fc11..245ef0b 100644
--- a/src/convolve/convolve.c
+++ b/src/convolve/convolve.c
@@ -204,7 +204,8 @@ makepaddedcomplex(struct convolveparams *p)
   errno=0;
   pimg=p->pimg=malloc(2*ps0*ps1*sizeof *pimg);
   if(pimg==NULL)
-    error(EXIT_FAILURE, errno, "%lu bytes for pimg", ps0*ps1*sizeof *pimg);
+    error(EXIT_FAILURE, errno, "%lu bytes for pimg",
+                  2*ps0*ps1*sizeof *pimg);
   for(i=0;i<ps0;++i)
     {
       op=(o=pimg+i*2*ps1)+2*ps1; /* pimg is complex.            */
@@ -221,7 +222,8 @@ makepaddedcomplex(struct convolveparams *p)
   errno=0;
   pker=p->pker=malloc(2*ps0*ps1*sizeof *pker);
   if(pker==NULL)
-    error(EXIT_FAILURE, errno, "%lu bytes for pker", ps0*ps1*sizeof *pker);
+    error(EXIT_FAILURE, errno, "%lu bytes for pker",
+                   2*ps0*ps1*sizeof *pker);
   for(i=0;i<ps0;++i)
     {
       op=(o=pker+i*2*ps1)+2*ps1; /* pker is complex.            */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]