From: Kevin Day Date: Wed, 6 Jun 2012 23:11:55 +0000 (-0500) Subject: Update: remove used vs size parameter checking X-Git-Tag: 0.3.0~23 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=53971f2c391136e7c70b035260cbcfbac1a5dab2;p=fll 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. --- 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;