[libepsilon] 02/05: Add declare-xmalloc.patch by Colin Watson to include mem_alloc.h in files that use xmalloc.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Sun Apr 17 12:02:42 UTC 2016


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository libepsilon.

commit b873a3a574a424a2778479616708991054240340
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sun Apr 17 12:57:27 2016 +0200

    Add declare-xmalloc.patch by Colin Watson to include mem_alloc.h in files that use xmalloc.
---
 debian/changelog                     |   2 +
 debian/patches/declare-xmalloc.patch | 110 +++++++++++++++++++++++++++++++++++
 debian/patches/series                |   1 +
 3 files changed, 113 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index c711735..e6bf2cf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 libepsilon (0.9.2+dfsg-2) UNRELEASED; urgency=medium
 
   * Bump Standards-Version to 3.9.8, no changes.
+  * Add declare-xmalloc.patch by Colin Watson to
+    include mem_alloc.h in files that use xmalloc.
 
  -- Bas Couwenberg <sebastic at debian.org>  Sun, 17 Apr 2016 12:43:26 +0200
 
diff --git a/debian/patches/declare-xmalloc.patch b/debian/patches/declare-xmalloc.patch
new file mode 100644
index 0000000..7ba78c0
--- /dev/null
+++ b/debian/patches/declare-xmalloc.patch
@@ -0,0 +1,110 @@
+Description: Include mem_alloc.h in files that use xmalloc
+ Also fix some incorrect calls exposed by this.
+Author: Colin Watson <cjwatson at ubuntu.com>
+Forwarded: no
+Last-Update: 2015-12-27
+
+--- a/src/cmd_decode_file.c
++++ b/src/cmd_decode_file.c
+@@ -47,6 +47,7 @@
+ #include <string.h>
+ #include <assert.h>
+ #include <time.h>
++#include <mem_alloc.h>
+ #include <options.h>
+ #include <misc.h>
+ #include <epsilon.h>
+--- a/src/cmd_encode_file.c
++++ b/src/cmd_encode_file.c
+@@ -47,6 +47,7 @@
+ #include <string.h>
+ #include <assert.h>
+ #include <time.h>
++#include <mem_alloc.h>
+ #include <options.h>
+ #include <misc.h>
+ #include <epsilon.h>
+--- a/src/cmd_start_node.c
++++ b/src/cmd_start_node.c
+@@ -48,6 +48,7 @@
+ #include <assert.h>
+ #include <errno.h>
+ #include <epsilon.h>
++#include <mem_alloc.h>
+ #include <options.h>
+ #include <misc.h>
+ 
+@@ -418,11 +419,11 @@ static void action_encode_gs(int sock_fd
+     filter[filter_len] = 0;
+ 
+     /* Allocate memory (it will be released implicitly at exit) */
+-    Y0 = (unsigned char *) xmalloc(block_size * block_size,
++    Y0 = (unsigned char *) xmalloc(block_size * block_size *
+         sizeof(unsigned char));
+     Y = (unsigned char **) eps_malloc_2D(block_size, block_size,
+         sizeof(unsigned char));
+-    buf = (unsigned char *) xmalloc(bytes_per_block,
++    buf = (unsigned char *) xmalloc(bytes_per_block *
+         sizeof(unsigned char));
+ 
+     /* Process all incoming blocks */
+@@ -526,7 +527,7 @@ static void action_encode_tc(int sock_fd
+     RECV_VALUE_FROM_MASTER(&Cr_ratio);
+ 
+     /* Allocate memory (it will be released implicitly at exit) */
+-    Y0 = (unsigned char *) xmalloc(block_size * block_size,
++    Y0 = (unsigned char *) xmalloc(block_size * block_size *
+         sizeof(unsigned char));
+     R = (unsigned char **) eps_malloc_2D(block_size, block_size,
+         sizeof(unsigned char));
+@@ -534,7 +535,7 @@ static void action_encode_tc(int sock_fd
+         sizeof(unsigned char));
+     B = (unsigned char **) eps_malloc_2D(block_size, block_size,
+         sizeof(unsigned char));
+-    buf = (unsigned char *) xmalloc(bytes_per_block,
++    buf = (unsigned char *) xmalloc(bytes_per_block *
+         sizeof(unsigned char));
+ 
+     /* Process all incoming blocks */
+@@ -628,11 +629,11 @@ static void action_decode_gs(int sock_fd
+     RECV_VALUE_FROM_MASTER(&block_size);
+ 
+     /* Allocate memory (it will be released implicitly at exit) */
+-    Y0 = (unsigned char *) xmalloc(block_size * block_size,
++    Y0 = (unsigned char *) xmalloc(block_size * block_size *
+         sizeof(unsigned char));
+     Y = (unsigned char **) eps_malloc_2D(block_size, block_size,
+         sizeof(unsigned char));
+-    buf = (unsigned char *) xmalloc(buf_size,
++    buf = (unsigned char *) xmalloc(buf_size *
+         sizeof(unsigned char));
+ 
+     /* Process all incoming blocks */
+@@ -707,7 +708,7 @@ static void action_decode_tc(int sock_fd
+     RECV_VALUE_FROM_MASTER(&block_size);
+ 
+     /* Allocate memory (it will be released implicitly at exit) */
+-    Y0 = (unsigned char *) xmalloc(block_size * block_size,
++    Y0 = (unsigned char *) xmalloc(block_size * block_size *
+         sizeof(unsigned char));
+     R = (unsigned char **) eps_malloc_2D(block_size, block_size,
+         sizeof(unsigned char));
+@@ -715,7 +716,7 @@ static void action_decode_tc(int sock_fd
+         sizeof(unsigned char));
+     B = (unsigned char **) eps_malloc_2D(block_size, block_size,
+         sizeof(unsigned char));
+-    buf = (unsigned char *) xmalloc(buf_size,
++    buf = (unsigned char *) xmalloc(buf_size *
+         sizeof(unsigned char));
+ 
+     /* Process all incoming blocks */
+--- a/src/worker_mpi_node.c
++++ b/src/worker_mpi_node.c
+@@ -31,6 +31,7 @@
+ #include <mpi.h>
+ #include <worker_mpi_node.h>
+ #include <epsilon.h>
++#include <mem_alloc.h>
+ #include <misc.h>
+ #include <stdio.h>
+ #include <stdlib.h>
diff --git a/debian/patches/series b/debian/patches/series
index c5bc2d1..3f94e39 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 disable-lena-tests.patch
+declare-xmalloc.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/libepsilon.git



More information about the Pkg-grass-devel mailing list