Author: mlschroe Date: Wed Jan 30 12:17:07 2008 New Revision: 8409 URL: http://svn.opensuse.org/viewcvs/zypp?rev=8409&view=rev Log: - allow empty string space Modified: trunk/sat-solver/tools/repo_write.c Modified: trunk/sat-solver/tools/repo_write.c URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/tools/repo_write.c?rev=8409&r1=8408&r2=8409&view=diff ============================================================================== --- trunk/sat-solver/tools/repo_write.c (original) +++ trunk/sat-solver/tools/repo_write.c Wed Jan 30 12:17:07 2008 @@ -138,7 +138,7 @@ putc(x >> 8, fp) == EOF || putc(x, fp) == EOF) { - perror("write error"); + perror("write error u32"); exit(1); } } @@ -153,7 +153,7 @@ { if (putc(x, fp) == EOF) { - perror("write error"); + perror("write error u8"); exit(1); } } @@ -167,7 +167,7 @@ { if (fwrite(data, len, 1, fp) != 1) { - perror("write error"); + perror("write error blob"); exit(1); } } @@ -191,7 +191,7 @@ putc((x >> 7) | 128, fp); if (putc(x & 127, fp) == EOF) { - perror("write error"); + perror("write error id"); exit(1); } } @@ -1258,10 +1258,13 @@ */ write_u32(fp, sizeid); write_u32(fp, pp - prefix); - if (fwrite(prefix, pp - prefix, 1, fp) != 1) + if (pp != prefix) { - perror("write error"); - exit(1); + if (fwrite(prefix, pp - prefix, 1, fp) != 1) + { + perror("write error prefix"); + exit(1); + } } sat_free(prefix); -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org