1
1

* Fix comment about size_t being unsigned

* Fix initializer - shouldn't assign a negative value into an unsigned
  variable

This commit was SVN r9790.
Этот коммит содержится в:
Brian Barrett 2006-05-02 12:21:30 +00:00
родитель 4add400f7d
Коммит 10a05dc0d1

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

@ -41,7 +41,7 @@ int opal_size2int(size_t in, int *out, bool want_check)
*/
static bool init_done = false;
static unsigned int int_pos = -1;
static unsigned int int_pos = 0;
static void opal_size2int_init(void);
@ -59,7 +59,7 @@ int opal_size2int(size_t in, int *out, bool want_check)
*out = pos[int_pos];
if (want_check) {
/* Remember that size_t is signed, so we don't need to check
/* Remember that size_t is unsigned, so we don't need to check
for when in < 0 (in which case the internal checks would be
slightly different) */
for (i = 0; i < (sizeof(in) / sizeof(*out)); ++i) {