- Timestamp:
- Jun 25, 2002, 9:11:58 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/shell32/changenotify.c
r8614 r8755 1 /* $Id: changenotify.c,v 1. 3 2002-06-09 12:41:20sandervl Exp $ */1 /* $Id: changenotify.c,v 1.4 2002-06-25 07:11:58 sandervl Exp $ */ 2 2 /* 3 3 * shell change notification … … 26 26 { 27 27 struct _NOTIFICATIONLIST *next; 28 struct _NOTIFICATIONLIST *prev; 28 struct _NOTIFICATIONLIST *prev; 29 29 HWND hwnd; /* window to notify */ 30 30 DWORD uMsg; /* message to send */ … … 55 55 56 56 while(ptr != &tail) 57 { 57 { 58 58 int i; 59 59 item = ptr; … … 61 61 62 62 TRACE("item=%p\n", item); 63 63 64 64 /* free the item */ 65 65 for (i=0; i<item->cidl;i++) SHFree(item->apidl[i].pidlPath); … … 106 106 107 107 ptr = head.next; 108 #ifdef __WIN32OS2__ 109 while((ptr != &tail)/* && (ret == FALSE) see the rant below */) 110 #else 108 111 while((ptr != &tail) && (ret == FALSE)) 109 { 112 #endif 113 { 110 114 TRACE("ptr=%p\n", ptr); 111 115 112 116 if (ptr == item) 113 117 { 114 118 int i; 115 119 116 120 TRACE("item=%p prev=%p next=%p\n", item, item->prev, item->next); 117 121 … … 124 128 SHFree(item->apidl); 125 129 SHFree(item); 126 ret = TRUE; 130 #ifdef __WIN32OS2__ 131 /* ret = TRUE; 132 * <rant> HEY! Have you guys ever heard about the break keyword? 133 * And please don't test if ret == FALSE. Test !ret!!! </rant> 134 * Anyway, ptr == item, we free item hence the memory shouldn't be 135 * accessed by us any longer. We have to break here so we do NOT do 136 * the next operation below! 137 * -bird- 138 */ 139 break; 140 #else 141 ret = TRUE; 142 #endif 127 143 } 128 144 ptr = ptr->next; … … 222 238 { 223 239 TRACE("trying %p\n", ptr); 224 240 225 241 if(wEventId & ptr->wEventMask) 226 242 { … … 268 284 { 269 285 TRACE("trying %p\n", ptr); 270 286 271 287 if(wEventId & ptr->wEventMask) 272 288 {
Note:
See TracChangeset
for help on using the changeset viewer.