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

Unified Diff: src/trusted/validator_x86/nc_inst_iter.c

Issue 6883091: Start unit testing for functions in nc_inst_state.c (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 years, 8 months 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: src/trusted/validator_x86/nc_inst_iter.c
===================================================================
--- src/trusted/validator_x86/nc_inst_iter.c (revision 4944)
+++ src/trusted/validator_x86/nc_inst_iter.c (working copy)
@@ -74,8 +74,12 @@
free(iter);
}
+NaClInstState* NaClInstIterGetUndecodedState(NaClInstIter* iter) {
+ return &iter->buffer[iter->buffer_index];
+}
+
NaClInstState* NaClInstIterGetState(NaClInstIter* iter) {
- NaClInstState* state = &iter->buffer[iter->buffer_index];
+ NaClInstState* state = NaClInstIterGetUndecodedState(iter);
if (NULL == state->inst) {
NaClDecodeInst(iter, state);
}

Powered by Google App Engine
This is Rietveld 408576698