fnt2fon: janitorial IgnoredReturnValues.
Lionel Debroux
lionel_debroux at yahoo.fr
Fri Sep 14 07:08:45 CDT 2007
---
tools/fnt2fon.c | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/tools/fnt2fon.c b/tools/fnt2fon.c
index 3f82fd9..e63aca6 100644
--- a/tools/fnt2fon.c
+++ b/tools/fnt2fon.c
@@ -118,6 +118,17 @@ int main(int argc, char **argv)
exit(1);
}
+ // Setup cleanup functions.
+ if ( (atexit( cleanup_files ) != 0)
+ || (signal( SIGTERM, exit_on_signal ) == SIG_ERR)
+ || (signal( SIGINT, exit_on_signal ) == SIG_ERR)
+#ifdef SIGHUP
+ || (signal( SIGHUP, exit_on_signal ) == SIG_ERR)
+#endif
+ ) {
+ fprintf(stderr, "Cannot initialize cleanup\n");
+ }
+
num_files = argc - 2;
file_lens = malloc(num_files * sizeof(int));
for(i = 0; i < num_files; i++) {
@@ -190,13 +201,6 @@ int main(int argc, char **argv)
fontdir_off = (non_resident_name_off + non_resident_name_len + 15) & ~0xf;
font_off = (fontdir_off + fontdir_len + 15) & ~0x0f;
- atexit( cleanup_files );
- signal( SIGTERM, exit_on_signal );
- signal( SIGINT, exit_on_signal );
-#ifdef SIGHUP
- signal( SIGHUP, exit_on_signal );
-#endif
-
output_file = argv[argc - 1];
ofp = fopen(output_file, "wb");
--
1.5.2.4
--------------070302090005010203060808--
More information about the wine-patches
mailing list