Mercurial > emacs
diff src/macterm.c @ 95481:4390d64d3328
Make "xfree (NULL)" a no-op; remove useless if-before-xfree.
* src/alloc.c (xfree): Return right away for a NULL arg.
* src/lread.c (nosuffix): Remove now-useless if-before-xfree tests.
* src/gtkutil.c (xg_gtk_scroll_destroy): Likewise.
* src/mac.c (create_apple_event_from_event_ref): Likewise.
(create_apple_event_from_drag_ref, cfstring_create_normalized): Likewise.
* src/doprnt.c (doprnt1): Likewise.
* src/frame.c (frame): Likewise.
* src/keyboard.c (wipe_kboard): Likewise.
* src/macterm.c (x_free_frame_resources, xlfdpat_destroy, XFreePixmap):
(init_font_name_table, mac_unload_font, x_delete_display): Likewise.
* src/term.c (tty_default_color_capabilities, maybe_fatal)
(delete_tty): Likewise.
* src/w16select.c (string): Likewise.
* src/w32.c (w32_get_resource, SET_ENV_BUF_SIZE): Likewise.
* src/w32bdf.c (w32_free_bdf_font): Likewise.
* src/w32fns.c (w32_unload_font): Likewise.
* src/w32font.c (w32font_close): Likewise.
* src/window.c (size_window): Likewise.
* src/xselect.c (receive_incremental_selection): Likewise.
* src/xterm.c (x_free_frame_resources, x_delete_display): Likewise.
* src/mactoolbox.c (create_apple_event_from_drag_ref): Likewise.
* src/w32.c (stat): Likewise.
| author | Jim Meyering <jim@meyering.net> |
|---|---|
| date | Mon, 02 Jun 2008 06:09:17 +0000 |
| parents | b6dc3d9d071d |
| children | 953225ddde83 |
line wrap: on
line diff
--- a/src/macterm.c Mon Jun 02 06:02:30 2008 +0000 +++ b/src/macterm.c Mon Jun 02 06:09:17 2008 +0000 @@ -910,8 +910,7 @@ #if USE_MAC_IMAGE_IO if (pixmap) { - if (pixmap->data) - xfree (pixmap->data); + xfree (pixmap->data); xfree (pixmap); } #else @@ -7390,8 +7389,7 @@ x_free_gcs (f); - if (FRAME_SIZE_HINTS (f)) - xfree (FRAME_SIZE_HINTS (f)); + xfree (FRAME_SIZE_HINTS (f)); xfree (f->output_data.mac); f->output_data.mac = NULL; @@ -7640,8 +7638,7 @@ { if (pat->buf) { - if (pat->blocks) - xfree (pat->blocks); + xfree (pat->blocks); xfree (pat->buf); } xfree (pat); @@ -8364,8 +8361,7 @@ HASH_VALUE (h, j)); prev_family = family; } - if (font_ids) - xfree (font_ids); + xfree (font_ids); } #endif @@ -9242,20 +9238,17 @@ int i; for (i = font->min_byte1; i <= font->max_byte1; i++) - if (font->bounds.rows[i]) - xfree (font->bounds.rows[i]); + xfree (font->bounds.rows[i]); xfree (font->bounds.rows); ATSUDisposeStyle (font->mac_style); } else #endif - if (font->bounds.per_char) - xfree (font->bounds.per_char); + xfree (font->bounds.per_char); #if USE_CG_TEXT_DRAWING if (font->cg_font) CGFontRelease (font->cg_font); - if (font->cg_glyphs) - xfree (font->cg_glyphs); + xfree (font->cg_glyphs); #endif xfree (font); } @@ -13026,12 +13019,10 @@ if (dpyinfo->font_table) { - if (dpyinfo->font_table->font_encoder) - xfree (dpyinfo->font_table->font_encoder); + xfree (dpyinfo->font_table->font_encoder); xfree (dpyinfo->font_table); } - if (dpyinfo->mac_id_name) - xfree (dpyinfo->mac_id_name); + xfree (dpyinfo->mac_id_name); if (x_display_list == 0) {
