diff options
| author | Jim Meyering | 2009-06-29 05:28:54 +0000 |
|---|---|---|
| committer | Jim Meyering | 2009-06-29 05:28:54 +0000 |
| commit | 5f4457269e98f327c9795c797ed71fd6810a49c0 (patch) | |
| tree | d4c1122f06729dffdd9d9d8d42322188b1baf9e0 /src | |
| parent | e0f591953b48b3894458dc1746304de140018b45 (diff) | |
| download | emacs-5f4457269e98f327c9795c797ed71fd6810a49c0.tar.gz emacs-5f4457269e98f327c9795c797ed71fd6810a49c0.zip | |
Remove useless if-before-xfree tests.
* nsfont.m (nsfont_close): Remove useless test.
* term.c (delete_tty): Likewise.
* w32.c (system_process_attributes): Likewise.
* w32font.c (w32font_close): Likewise.
* xfaces.c (x_free_gc): Likewise.
* xselect.c (buffer): Likewise.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 10 | ||||
| -rw-r--r-- | src/nsfont.m | 6 | ||||
| -rw-r--r-- | src/term.c | 6 | ||||
| -rw-r--r-- | src/w32.c | 3 | ||||
| -rw-r--r-- | src/w32font.c | 3 | ||||
| -rw-r--r-- | src/xfaces.c | 3 | ||||
| -rw-r--r-- | src/xselect.c | 3 |
7 files changed, 18 insertions, 16 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8bee945b136..dcf58c7f631 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2009-06-29 Jim Meyering <meyering@redhat.com> | ||
| 2 | |||
| 3 | Remove useless if-before-xfree test. | ||
| 4 | * nsfont.m (nsfont_close): Remove useless test. | ||
| 5 | * term.c (delete_tty): Likewise. | ||
| 6 | * w32.c (system_process_attributes): Likewise. | ||
| 7 | * w32font.c (w32font_close): Likewise. | ||
| 8 | * xfaces.c (x_free_gc): Likewise. | ||
| 9 | * xselect.c (buffer): Likewise. | ||
| 10 | |||
| 1 | 2009-06-28 Andreas Schwab <schwab@linux-m68k.org> | 11 | 2009-06-28 Andreas Schwab <schwab@linux-m68k.org> |
| 2 | 12 | ||
| 3 | * process.c (send_process): Keep decoded string in a local | 13 | * process.c (send_process): Keep decoded string in a local |
diff --git a/src/nsfont.m b/src/nsfont.m index 68ed1e6dd36..7241af3048c 100644 --- a/src/nsfont.m +++ b/src/nsfont.m | |||
| @@ -868,10 +868,8 @@ nsfont_close (FRAME_PTR f, struct font *font) | |||
| 868 | 868 | ||
| 869 | for (i =0; i<0x100; i++) | 869 | for (i =0; i<0x100; i++) |
| 870 | { | 870 | { |
| 871 | if (font_info->glyphs[i]) | 871 | xfree (font_info->glyphs[i]); |
| 872 | xfree (font_info->glyphs[i]); | 872 | xfree (font_info->metrics[i]); |
| 873 | if (font_info->metrics[i]) | ||
| 874 | xfree (font_info->metrics[i]); | ||
| 875 | } | 873 | } |
| 876 | [font_info->nsfont release]; | 874 | [font_info->nsfont release]; |
| 877 | #ifdef NS_IMPL_COCOA | 875 | #ifdef NS_IMPL_COCOA |
diff --git a/src/term.c b/src/term.c index fc778012e23..5176214b136 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -4018,10 +4018,8 @@ delete_tty (struct terminal *terminal) | |||
| 4018 | 4018 | ||
| 4019 | xfree (tty->old_tty); | 4019 | xfree (tty->old_tty); |
| 4020 | xfree (tty->Wcm); | 4020 | xfree (tty->Wcm); |
| 4021 | if (tty->termcap_strings_buffer) | 4021 | xfree (tty->termcap_strings_buffer); |
| 4022 | xfree (tty->termcap_strings_buffer); | 4022 | xfree (tty->termcap_term_buffer); |
| 4023 | if (tty->termcap_term_buffer) | ||
| 4024 | xfree (tty->termcap_term_buffer); | ||
| 4025 | 4023 | ||
| 4026 | bzero (tty, sizeof (struct tty_display_info)); | 4024 | bzero (tty, sizeof (struct tty_display_info)); |
| 4027 | xfree (tty); | 4025 | xfree (tty); |
| @@ -3995,8 +3995,7 @@ system_process_attributes (pid) | |||
| 3995 | } | 3995 | } |
| 3996 | } | 3996 | } |
| 3997 | } | 3997 | } |
| 3998 | if (buf) | 3998 | xfree (buf); |
| 3999 | xfree (buf); | ||
| 4000 | } | 3999 | } |
| 4001 | if (!result) | 4000 | if (!result) |
| 4002 | { | 4001 | { |
diff --git a/src/w32font.c b/src/w32font.c index 4148e87c373..995500aa0e4 100644 --- a/src/w32font.c +++ b/src/w32font.c | |||
| @@ -289,8 +289,7 @@ w32font_close (f, font) | |||
| 289 | { | 289 | { |
| 290 | for (i = 0; i < w32_font->n_cache_blocks; i++) | 290 | for (i = 0; i < w32_font->n_cache_blocks; i++) |
| 291 | { | 291 | { |
| 292 | if (w32_font->cached_metrics[i]) | 292 | xfree (w32_font->cached_metrics[i]); |
| 293 | xfree (w32_font->cached_metrics[i]); | ||
| 294 | } | 293 | } |
| 295 | xfree (w32_font->cached_metrics); | 294 | xfree (w32_font->cached_metrics); |
| 296 | w32_font->cached_metrics = NULL; | 295 | w32_font->cached_metrics = NULL; |
diff --git a/src/xfaces.c b/src/xfaces.c index 704d7a92049..3faaf247296 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -785,8 +785,7 @@ x_free_gc (f, gc) | |||
| 785 | struct frame *f; | 785 | struct frame *f; |
| 786 | GC gc; | 786 | GC gc; |
| 787 | { | 787 | { |
| 788 | if (gc) | 788 | xfree (gc); |
| 789 | xfree (gc); | ||
| 790 | } | 789 | } |
| 791 | #endif /* HAVE_NS */ | 790 | #endif /* HAVE_NS */ |
| 792 | 791 | ||
diff --git a/src/xselect.c b/src/xselect.c index b9b8e0c1539..5cf4f74602c 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -2395,8 +2395,7 @@ DEFUN ("x-get-cut-buffer-internal", Fx_get_cut_buffer_internal, | |||
| 2395 | 2395 | ||
| 2396 | if (!data || !format) | 2396 | if (!data || !format) |
| 2397 | { | 2397 | { |
| 2398 | if (data) | 2398 | xfree (data); |
| 2399 | xfree (data); | ||
| 2400 | return Qnil; | 2399 | return Qnil; |
| 2401 | } | 2400 | } |
| 2402 | 2401 | ||