File: 0006-Don-t-exit-from-library.patch

package info (click to toggle)
openems 0.0.35%2Bgit20190103.6a75e98%2Bdfsg.1-3.2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,544 kB
  • sloc: cpp: 40,417; python: 2,028; yacc: 580; makefile: 459; lex: 350; sh: 176; ruby: 19
file content (57 lines) | stat: -rw-r--r-- 2,013 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
From: Ruben Undheim <ruben.undheim@gmail.com>
Date: Mon, 21 Nov 2016 00:45:35 +0100
Subject: Don't exit from library

---
 openEMS/tools/array_ops.cpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/openEMS/tools/array_ops.cpp b/openEMS/tools/array_ops.cpp
index 8710b3c..7100f9a 100644
--- a/openEMS/tools/array_ops.cpp
+++ b/openEMS/tools/array_ops.cpp
@@ -73,7 +73,7 @@ f4vector* Create1DArray_v4sf(const unsigned int numLines)
 	if (MEMALIGN( (void**)&array, 16, sizeof(typeof(f4vector))*numLines ))
 	{
 		cerr << "cannot allocate aligned memory" << endl;
-		exit(3);
+		return 0;
 	}
 	for (unsigned int pos=0; pos<numLines; ++pos)
 	{
@@ -95,7 +95,7 @@ f4vector*** Create3DArray_v4sf(const unsigned int* numLines)
 	if (MEMALIGN( (void**)&array, 16, sizeof(typeof(f4vector**))*numLines[0] ))
 	{
 		cerr << "cannot allocate aligned memory" << endl;
-		exit(3);
+		return 0;
 	}
 	//array = new f4vector**[numLines[0]];
 	for (pos[0]=0; pos[0]<numLines[0]; ++pos[0])
@@ -103,7 +103,7 @@ f4vector*** Create3DArray_v4sf(const unsigned int* numLines)
 		if (MEMALIGN( (void**)&array[pos[0]], 16, sizeof(typeof(f4vector*))*numLines[1] ))
 		{
 			cerr << "cannot allocate aligned memory" << endl;
-			exit(3);
+			return 0;
 		}
 		//array[pos[0]] = new f4vector*[numLines[1]];
 		for (pos[1]=0; pos[1]<numLines[1]; ++pos[1])
@@ -111,7 +111,7 @@ f4vector*** Create3DArray_v4sf(const unsigned int* numLines)
 			if (MEMALIGN( (void**)&array[pos[0]][pos[1]], 16, sizeof(typeof(f4vector))*numZ ))
 			{
 				cerr << "cannot allocate aligned memory" << endl;
-				exit(3);
+				return 0;
 			}
 			//array[pos[0]][pos[1]] = new f4vector[numZ];
 			for (pos[2]=0; pos[2]<numZ; ++pos[2])
@@ -132,7 +132,7 @@ f4vector**** Create_N_3DArray_v4sf(const unsigned int* numLines)
 	if (MEMALIGN( (void**)&array, 16, sizeof(typeof(f4vector***))*3 ))
 	{
 		cerr << "cannot allocate aligned memory" << endl;
-		exit(3);
+		return 0;
 	}
 	//array = new f4vector***[3];
 	for (int n=0; n<3; ++n)