MonetDB: Jun2023 - Remove dead code.

2023-08-02 Thread Sjoerd Mullender via checkin-list
Changeset: b6b3e4d220a3 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/b6b3e4d220a3
Modified Files:
monetdb5/mal/mal_instruction.c
Branch: Jun2023
Log Message:

Remove dead code.


diffs (21 lines):

diff --git a/monetdb5/mal/mal_instruction.c b/monetdb5/mal/mal_instruction.c
--- a/monetdb5/mal/mal_instruction.c
+++ b/monetdb5/mal/mal_instruction.c
@@ -456,17 +456,7 @@ newInstructionArgs(MalBlkPtr mb, const c
 
p = GDKzalloc(args * sizeof(p->argv[0]) + offsetof(InstrRecord, argv));
if (p == NULL) {
-#if 0
-   /* We are facing an hard problem.
-* The upper layers of the code base assume that this routine 
will always produce a structure.
-* Furthermore, failure to allocate such a small data structure 
indicates we are in serious trouble.
-* The only way out is declare it a fatal error, terminate the 
system to avoid crashes in all kind of places.
-*/
-   GDKfatal(SQLSTATE(HY013) MAL_MALLOC_FAIL);
-   exit(1);
-#else
return NULL;
-#endif
}
p->maxarg = args;
p->typechk = TYPE_UNKNOWN;
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: Jun2023 - Remove dead code.

2023-07-27 Thread Sjoerd Mullender via checkin-list
Changeset: 93776e0e0f42 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/93776e0e0f42
Modified Files:
monetdb5/modules/mal/pcre.c
Branch: Jun2023
Log Message:

Remove dead code.

utfc8touc does not return -2, and we already checked for -1.


diffs (31 lines):

diff --git a/monetdb5/modules/mal/pcre.c b/monetdb5/modules/mal/pcre.c
--- a/monetdb5/modules/mal/pcre.c
+++ b/monetdb5/modules/mal/pcre.c
@@ -208,8 +208,6 @@ mywstrncaseeq(const char *restrict s1, c
return (*s2 == 0);
if (*s2 == 0)
return false;
-   if (nn1 == (size_t) -1 || nn1 == (size_t) -2)
-   return true; /* actually an error that shouldn't 
happen */
 #if SIZEOF_WCHAR_T == 2
if (c1 > 0x || *s2 > 0x) {
if (c1 != *s2)
@@ -237,9 +235,6 @@ mystrcasecmp(const char *s1, const char 
return -(nn2 != 0 && nn2 != (size_t) -1);
if (nn2 == 0 || nn2 == (size_t) -1)
return 1;
-   if (nn1 == (size_t) -1 || nn1 == (size_t) -2 ||
-   nn2 == (size_t) -1 || nn2 == (size_t) -2)
-   return 0;/* actually an error that shouldn't 
happen */
 #if SIZEOF_WCHAR_T == 2
if (c1 > 0x || c2 > 0x) {
if (c1 != c2)
@@ -264,8 +259,6 @@ mywstrcasecmp(const char *restrict s1, c
return -(*s2 != 0);
if (*s2 == 0)
return 1;
-   if (nn1 == (size_t) -1 || nn1 == (size_t) -2)
-   return 0;/* actually an error that shouldn't 
happen */
 #if SIZEOF_WCHAR_T == 2
if (c1 > 0x || *s2 > 0x) {
if (c1 != *s2)
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org