1
1

Oops -- missed some argeed-upon style things

This commit was SVN r320.
Этот коммит содержится в:
Jeff Squyres 2004-01-13 02:57:17 +00:00
родитель 88ac536659
Коммит c21aa53812

Просмотреть файл

@ -253,15 +253,17 @@ static bool test7(void)
/* check a NULL pointer first -- should return 0 */ /* check a NULL pointer first -- should return 0 */
if (lam_argv_len(NULL) != (size_t) 0) if (lam_argv_len(NULL) != (size_t) 0) {
return false; return false;
}
/* now check a real string */ /* now check a real string */
/* size should be (sizeof(char **) + (sizeof(char) + sizeof('\0') + /* size should be (sizeof(char **) + (sizeof(char) + sizeof('\0') +
sizeof(char*)) * 3) */ sizeof(char*)) * 3) */
if (lam_argv_len(a) != a_len) if (lam_argv_len(a) != a_len) {
return false; return false;
}
/* All done */ /* All done */
@ -277,18 +279,22 @@ static bool test8(void)
/* bozo case */ /* bozo case */
if (NULL != lam_argv_copy(NULL)) if (NULL != lam_argv_copy(NULL)) {
return false; return false;
}
/* dup the a array and compare it (array length, contents, etc.) */ /* dup the a array and compare it (array length, contents, etc.) */
b = lam_argv_copy(a); b = lam_argv_copy(a);
if (lam_argv_count(a) != lam_argv_count(b)) if (lam_argv_count(a) != lam_argv_count(b)) {
return false; return false;
for (i = 0; a[i] != NULL; ++i) }
if (strcmp(a[i], b[i]) != 0) for (i = 0; a[i] != NULL; ++i) {
if (0 != strcmp(a[i], b[i])) {
return false; return false;
}
}
/* All done */ /* All done */