Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1994)

Unified Diff: core/src/fxcrt/fx_basic_plex.cpp

Issue 1529553003: Merge to XFA: Get rid of most instance of 'foo != NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/src/fxcrt/fx_basic_plex.cpp
diff --git a/core/src/fxcrt/fx_basic_plex.cpp b/core/src/fxcrt/fx_basic_plex.cpp
index b6383ecf20ca705840a8ea5e224595f3e79c3c53..91cc1313bdf3b6bf1c6ae8e5df56422e9f019407 100644
--- a/core/src/fxcrt/fx_basic_plex.cpp
+++ b/core/src/fxcrt/fx_basic_plex.cpp
@@ -18,10 +18,9 @@ CFX_Plex* CFX_Plex::Create(CFX_Plex*& pHead,
}
void CFX_Plex::FreeDataChain() {
CFX_Plex* p = this;
- while (p != NULL) {
- uint8_t* bytes = (uint8_t*)p;
- CFX_Plex* pNext = p->pNext;
- FX_Free(bytes);
- p = pNext;
+ while (p) {
+ CFX_Plex* old = p;
+ p = p->pNext;
+ FX_Free(old);
}
}

Powered by Google App Engine
This is Rietveld 408576698