EncryptInplace: Rename variable
We rename our 'buf' in the inner scope to avoid confusion with the 'buf' in the outer scope which is used immediately after exiting the inner scope. Test: TreeHugger Change-Id: I1c50546e86c680e963eedcbda26138f8b43e55e9
This commit is contained in:
parent
8859c9c9e7
commit
e0691cc674
1 changed files with 3 additions and 3 deletions
|
@ -524,11 +524,11 @@ static int cryptfs_enable_inplace_full(char* crypto_blkdev, char* real_blkdev, o
|
||||||
for (i /= CRYPT_SECTORS_PER_BUFSIZE; i < numblocks; i++) {
|
for (i /= CRYPT_SECTORS_PER_BUFSIZE; i < numblocks; i++) {
|
||||||
new_pct = (i + blocks_already_done) / one_pct;
|
new_pct = (i + blocks_already_done) / one_pct;
|
||||||
if (set_progress_properties && new_pct > cur_pct) {
|
if (set_progress_properties && new_pct > cur_pct) {
|
||||||
char buf[8];
|
char property_buf[8];
|
||||||
|
|
||||||
cur_pct = new_pct;
|
cur_pct = new_pct;
|
||||||
snprintf(buf, sizeof(buf), "%" PRId64, cur_pct);
|
snprintf(property_buf, sizeof(property_buf), "%" PRId64, cur_pct);
|
||||||
android::base::SetProperty("vold.encrypt_progress", buf);
|
android::base::SetProperty("vold.encrypt_progress", property_buf);
|
||||||
}
|
}
|
||||||
if (unix_read(realfd, buf, CRYPT_INPLACE_BUFSIZE) <= 0) {
|
if (unix_read(realfd, buf, CRYPT_INPLACE_BUFSIZE) <= 0) {
|
||||||
PLOG(ERROR) << "Error reading real_blkdev " << real_blkdev << " for inplace encrypt";
|
PLOG(ERROR) << "Error reading real_blkdev " << real_blkdev << " for inplace encrypt";
|
||||||
|
|
Loading…
Reference in a new issue