poldek: tndb/tndb.c - don't be stubborn
mis
mis at pld-linux.org
Sun Aug 20 16:07:25 CEST 2006
Author: mis Date: Sun Aug 20 14:07:24 2006 GMT
Module: poldek Tag: HEAD
---- Log message:
- don't be stubborn
---- Files affected:
poldek/tndb:
tndb.c (1.11 -> 1.12)
---- Diffs:
================================================================
Index: poldek/tndb/tndb.c
diff -u poldek/tndb/tndb.c:1.11 poldek/tndb/tndb.c:1.12
--- poldek/tndb/tndb.c:1.11 Sat Aug 19 15:21:53 2006
+++ poldek/tndb/tndb.c Sun Aug 20 16:07:19 2006
@@ -172,7 +172,6 @@
return 0;
stsize += sizeof(ssize) + size;
-
return stsize;
}
@@ -371,19 +370,20 @@
size = sizeof(hdr->hdr);
nerr += n_stream_read(st, hdr->hdr, size) != size;
- if (!n_stream_read_uint8(st, &hdr->flags))
+
+ if (nerr == 0 && !n_stream_read_uint8(st, &hdr->flags))
nerr++;
- if (!tndb_sign_restore(st, &hdr->sign, hdr->flags))
+ if (nerr == 0 && !tndb_sign_restore(st, &hdr->sign, hdr->flags))
nerr++;
- if (!n_stream_read_uint32(st, &hdr->ts))
+ if (nerr == 0 && !n_stream_read_uint32(st, &hdr->ts))
nerr++;
- if (!n_stream_read_uint32(st, &hdr->nrec))
+ if (nerr == 0 && !n_stream_read_uint32(st, &hdr->nrec))
nerr++;
- if (!n_stream_read_uint32(st, &hdr->doffs))
+ if (nerr == 0 && !n_stream_read_uint32(st, &hdr->doffs))
nerr++;
DBGF("nrec %u, doffs %u\n", hdr->nrec, hdr->doffs);
================================================================
---- CVS-web:
http://cvs.pld-linux.org/poldek/tndb/tndb.c?r1=1.11&r2=1.12&f=u
More information about the pld-cvs-commit
mailing list