author | Matthias Andree <matthias.andree@gmx.de> | |
Fri, 24 Jul 2009 08:17:13 +0000 (10:17 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 24 Jul 2009 16:12:26 +0000 (09:12 -0700) | ||
commit | 96d69b554325b6caa323428e64fba62ca033310d | |
tree | 2b2b26319cbf7d99a6155ae310b32f3d472c9d80 | tree | snapshot |
parent | 7e9ff00bbe1f437ff492a714758a4f7360feb22b | commit | diff |
Fix export_marks() error handling.
- Don't leak one FILE * on error per export_marks() call. Found with
cppcheck and reported by Martin Ettl.
- Abort the potentially long for(;idnums.size;) loop on write errors.
- Record error if fprintf() fails for reasons not required to set the
stream error indicator, such as ENOMEM.
- Add a trailing full-stop to error message when fopen() fails.
Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
- Don't leak one FILE * on error per export_marks() call. Found with
cppcheck and reported by Martin Ettl.
- Abort the potentially long for(;idnums.size;) loop on write errors.
- Record error if fprintf() fails for reasons not required to set the
stream error indicator, such as ENOMEM.
- Add a trailing full-stop to error message when fopen() fails.
Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-fast-export.c | diff | blob | history |