Skip to content

Commit aa5938d

Browse files
committed
---
yaml --- r: 58183 b: refs/heads/auto c: db1a274 h: refs/heads/master i: 58181: 1926d8a 58179: bcacfad 58175: 6ea15ad v: v3
1 parent 678885e commit aa5938d

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: 45ae3402e034e83d254d1bc36914f8433202bad9
17+
refs/heads/auto: db1a274bf54343605c8ac3a38a6c69f7d930192b
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/src/libcore/io.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -868,9 +868,19 @@ impl Reader for *libc::FILE {
868868
assert!(buf_len >= len);
869869

870870
let count = libc::fread(buf_p as *mut c_void, 1u as size_t,
871-
len as size_t, *self);
871+
len as size_t, *self) as uint;
872+
if count < len {
873+
match libc::ferror(*self) {
874+
0 => (),
875+
_ => {
876+
error!("error reading buffer");
877+
error!("%s", os::last_os_error());
878+
fail!();
879+
}
880+
}
881+
}
872882

873-
count as uint
883+
count
874884
}
875885
}
876886
}

branches/auto/src/libcore/vec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3305,7 +3305,7 @@ mod tests {
33053305
}
33063306

33073307
#[test]
3308-
fn test_each_nonempty() {
3308+
fn test_iter_nonempty() {
33093309
let mut i = 0;
33103310
for each(~[1, 2, 3]) |v| {
33113311
i += *v;
@@ -3314,7 +3314,7 @@ mod tests {
33143314
}
33153315

33163316
#[test]
3317-
fn test_eachi() {
3317+
fn test_iteri() {
33183318
let mut i = 0;
33193319
for eachi(~[1, 2, 3]) |j, v| {
33203320
if i == 0 { assert!(*v == 1); }

0 commit comments

Comments
 (0)