Reported by khb.hnu, Apr 12, 2009
Line30:
for (i = 0; i < sizeof(status_code_string) / sizeof(status_code_string[0]);
change it as follow:
for (i = 0; i < sizeof(status_code_strings) / sizeof(status_code_strings[0]);
git-svn-id: http://cmockery.googlecode.com/svn/trunk@33
40f4469a-5155-0410-be90-
2de3f0bae501
unsigned int string_to_status_code(const char* const status_code_string) {
unsigned int i;
unsigned int string_to_status_code(const char* const status_code_string) {
unsigned int i;
- for (i = 0; i < sizeof(status_code_string) / sizeof(status_code_string[0]);
- i++) {
+ for (i = 0; i < sizeof(status_code_strings) /
+ sizeof(status_code_strings[0]); i++) {
if (strcmp(status_code_strings[i], status_code_string) == 0) {
return i;
}
if (strcmp(status_code_strings[i], status_code_string) == 0) {
return i;
}
-<!-- hhmts start --> Last modified: Tue Aug 26 09:33:31 PDT 2008 <!-- hhmts end -->
+<!-- hhmts start --> Last modified: Mon Jul 6 12:21:30 PDT 2009 <!-- hhmts end -->
unsigned int string_to_status_code(const char* const status_code_string) {
unsigned int i;
unsigned int string_to_status_code(const char* const status_code_string) {
unsigned int i;
- for (i = 0; i < sizeof(status_code_string) / sizeof(status_code_string[0]);
- i++) {
+ for (i = 0; i < sizeof(status_code_strings) /
+ sizeof(status_code_strings[0]); i++) {
if (strcmp(status_code_strings[i], status_code_string) == 0) {
return i;
}
if (strcmp(status_code_strings[i], status_code_string) == 0) {
return i;
}