Whamcloud - gitweb
Branch: b_new_cmd
authorwangdi <wangdi>
Mon, 16 Oct 2006 15:06:13 +0000 (15:06 +0000)
committerwangdi <wangdi>
Mon, 16 Oct 2006 15:06:13 +0000 (15:06 +0000)
replace atoi to strtoul, since atoi can not cast 0xffffffff to -1

lustre/tests/ll_dirstripe_verify.c

index a09f023..527fa9a 100644 (file)
@@ -94,7 +94,7 @@ int compare(struct lov_user_md *lum_dir, struct lov_user_md *lum_file1,
                 if (read_proc_entry(tmp_path, buf, sizeof(buf)) < 0)
                         return 5;
 
-                stripe_count = atoi(buf);
+                stripe_count = (int)strtoul(buf, NULL, 10);;
         } else {
                 stripe_count = (int)lum_dir->lmm_stripe_count;
         }