From: Ralf Jung Date: Mon, 11 Apr 2022 22:05:56 +0000 (-0400) Subject: add some comments to code snippets X-Git-Url: https://git.ralfj.de/web.git/commitdiff_plain/23f84531f8614d9ef33abf008c73ad0f6211952f?ds=sidebyside;hp=da273b949bd13952f321456db5cbd2f4c5fb3af4 add some comments to code snippets --- diff --git a/ralf/_posts/2022-04-11-provenance-exposed.md b/ralf/_posts/2022-04-11-provenance-exposed.md index 56b7203..5265df6 100644 --- a/ralf/_posts/2022-04-11-provenance-exposed.md +++ b/ralf/_posts/2022-04-11-provenance-exposed.md @@ -78,7 +78,7 @@ static int uwu(int *restrict x, int *restrict y) { int *y2 = y-1; uintptr_t y2addr = (uintptr_t)y2; - int *ptr = (int*)y2addr; + int *ptr = (int*)y2addr; // <-- using y2addr *ptr = 1; return *x; @@ -104,7 +104,7 @@ static int uwu(int *restrict x, int *restrict y) { int *ptr = (int*)y2addr; *ptr = 1; - return 0; + return 0; // <-- hard-coded return value } int main() {