Mercurial > emacs
comparison src/w32.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 | 3df8e58fdc7f |
children | d6a4488883dc |
comparison
equal
deleted
inserted
replaced
95480:1c16540a2329 | 95481:4390d64d3328 |
---|---|
1126 { | 1126 { |
1127 RegCloseKey (hrootkey); | 1127 RegCloseKey (hrootkey); |
1128 return (lpvalue); | 1128 return (lpvalue); |
1129 } | 1129 } |
1130 | 1130 |
1131 if (lpvalue) xfree (lpvalue); | 1131 xfree (lpvalue); |
1132 | 1132 |
1133 RegCloseKey (hrootkey); | 1133 RegCloseKey (hrootkey); |
1134 } | 1134 } |
1135 | 1135 |
1136 if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, REG_ROOT, 0, KEY_READ, &hrootkey) == ERROR_SUCCESS) | 1136 if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, REG_ROOT, 0, KEY_READ, &hrootkey) == ERROR_SUCCESS) |
1143 { | 1143 { |
1144 RegCloseKey (hrootkey); | 1144 RegCloseKey (hrootkey); |
1145 return (lpvalue); | 1145 return (lpvalue); |
1146 } | 1146 } |
1147 | 1147 |
1148 if (lpvalue) xfree (lpvalue); | 1148 xfree (lpvalue); |
1149 | 1149 |
1150 RegCloseKey (hrootkey); | 1150 RegCloseKey (hrootkey); |
1151 } | 1151 } |
1152 | 1152 |
1153 return (NULL); | 1153 return (NULL); |
1344 | 1344 |
1345 if ((lpval = w32_get_resource (env_vars[i].name, &dwType)) == NULL | 1345 if ((lpval = w32_get_resource (env_vars[i].name, &dwType)) == NULL |
1346 /* Also ignore empty environment variables. */ | 1346 /* Also ignore empty environment variables. */ |
1347 || *lpval == 0) | 1347 || *lpval == 0) |
1348 { | 1348 { |
1349 if (lpval) xfree (lpval); | 1349 xfree (lpval); |
1350 lpval = env_vars[i].def_value; | 1350 lpval = env_vars[i].def_value; |
1351 dwType = REG_EXPAND_SZ; | 1351 dwType = REG_EXPAND_SZ; |
1352 dont_free = 1; | 1352 dont_free = 1; |
1353 } | 1353 } |
1354 | 1354 |
2960 buf->st_nlink = 1; | 2960 buf->st_nlink = 1; |
2961 fake_inode = 0; | 2961 fake_inode = 0; |
2962 | 2962 |
2963 get_file_owner_and_group (NULL, name, buf); | 2963 get_file_owner_and_group (NULL, name, buf); |
2964 } | 2964 } |
2965 if (psd) | 2965 xfree (psd); |
2966 xfree (psd); | |
2967 | 2966 |
2968 #if 0 | 2967 #if 0 |
2969 /* Not sure if there is any point in this. */ | 2968 /* Not sure if there is any point in this. */ |
2970 if (!NILP (Vw32_generate_fake_inodes)) | 2969 if (!NILP (Vw32_generate_fake_inodes)) |
2971 fake_inode = generate_inode_val (name); | 2970 fake_inode = generate_inode_val (name); |