projects
/
platform
/
upstream
/
libsolv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bfa05be
)
- grr, warn_unused_result
author
Michael Schroeder
<mls@suse.de>
Fri, 3 Jul 2009 10:43:57 +0000
(12:43 +0200)
committer
Michael Schroeder
<mls@suse.de>
Fri, 3 Jul 2009 10:43:57 +0000
(12:43 +0200)
examples/solv.c
patch
|
blob
|
history
diff --git
a/examples/solv.c
b/examples/solv.c
index e7092a61deb13b6d37cf0260c14c72716fd84453..182b7d15dd923f85310638827affb19244d5bfef 100644
(file)
--- a/
examples/solv.c
+++ b/
examples/solv.c
@@
-401,7
+401,13
@@
writecachedrepo(Repo *repo, unsigned char *cookie)
repodata_internalize(info);
repo_write(repo, fp, 0, 0, 0);
repodata_free(info);
- fwrite(cookie, 32, 1, fp);
+ if (fwrite(cookie, 32, 1, fp) != 1)
+ {
+ fclose(fp);
+ unlink(tmpl);
+ free(tmpl);
+ return;
+ }
if (fclose(fp))
{
unlink(tmpl);