From 53971f2c391136e7c70b035260cbcfbac1a5dab2 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 6 Jun 2012 18:11:55 -0500 Subject: [PATCH] Update: remove used vs size parameter checking Remove this so that non-dynamic strings can be placed in a dynamic string data type. In such cases, the dynamic string has a used but not a size. This means allocations should not be performed on the string. --- level_1/fl_strings/c/strings.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/level_1/fl_strings/c/strings.c b/level_1/fl_strings/c/strings.c index 88baa84..ff3771d 100644 --- a/level_1/fl_strings/c/strings.c +++ b/level_1/fl_strings/c/strings.c @@ -148,9 +148,6 @@ extern "C"{ #ifndef _di_level_1_parameter_checking_ if (string1.used <= 0) return f_invalid_parameter; if (string2.used <= 0) return f_invalid_parameter; - - if (string1.used > string1.size) return f_invalid_parameter; - if (string2.used > string2.size) return f_invalid_parameter; #endif // _di_level_1_parameter_checking_ f_string_length i1 = f_string_length_initialize; @@ -186,9 +183,6 @@ extern "C"{ if (string1.used <= 0) return f_invalid_parameter; if (string2.used <= 0) return f_invalid_parameter; - if (string1.used > string1.size) return f_invalid_parameter; - if (string2.used > string2.size) return f_invalid_parameter; - if (offset1.start > offset1.stop) return f_invalid_parameter; if (offset2.start > offset2.stop) return f_invalid_parameter; -- 1.8.3.1