diff options
| author | 2018-09-21 15:35:50 +0000 | |
|---|---|---|
| committer | 2018-09-21 15:35:50 +0000 | |
| commit | f8120a1c91e17c63c4545f07210a1e11d21dcc1c (patch) | |
| tree | f654a3aefcfc903de035650e44bce147593ab7fe /runtime/dex/dex_file_annotations.cc | |
| parent | 7ee67be05356a74bc993b7afa67439cb2f6c6a57 (diff) | |
| parent | c74d9cbd4c7b1b5b1a4c5a6bb34e9426336bbecc (diff) | |
Merge "ART: Modernize counting-down loops"
Diffstat (limited to 'runtime/dex/dex_file_annotations.cc')
| -rw-r--r-- | runtime/dex/dex_file_annotations.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/dex/dex_file_annotations.cc b/runtime/dex/dex_file_annotations.cc index 51cfd43fd1..b50a430843 100644 --- a/runtime/dex/dex_file_annotations.cc +++ b/runtime/dex/dex_file_annotations.cc @@ -209,7 +209,7 @@ bool SkipAnnotationValue(const DexFile& dex_file, const uint8_t** annotation_ptr case DexFile::kDexAnnotationArray: { uint32_t size = DecodeUnsignedLeb128(&annotation); - while (size--) { + for (; size != 0u; --size) { if (!SkipAnnotationValue(dex_file, &annotation)) { return false; } @@ -221,7 +221,7 @@ bool SkipAnnotationValue(const DexFile& dex_file, const uint8_t** annotation_ptr { DecodeUnsignedLeb128(&annotation); // unused type_index uint32_t size = DecodeUnsignedLeb128(&annotation); - while (size--) { + for (; size != 0u; --size) { DecodeUnsignedLeb128(&annotation); // unused element_name_index if (!SkipAnnotationValue(dex_file, &annotation)) { return false; |