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

Unified Diff: src/platform/vboot_reference/include/utility.h

Issue 1241002: VBoot Reference: Add version checking to for preventing rollbacks. (Closed)
Patch Set: . Created 10 years, 9 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
« no previous file with comments | « src/platform/vboot_reference/include/rollback_index.h ('k') | src/platform/vboot_reference/tests/Makefile » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/vboot_reference/include/utility.h
diff --git a/src/platform/vboot_reference/include/utility.h b/src/platform/vboot_reference/include/utility.h
index 5dc6d2838951c627af4ffc15b76672435d39439f..79713477c882e71b5d3735de37a6eba70fab16d1 100644
--- a/src/platform/vboot_reference/include/utility.h
+++ b/src/platform/vboot_reference/include/utility.h
@@ -13,6 +13,14 @@
#include <inttypes.h>
#include <string.h>
+/* Combine [msw] and [lsw] uint16s to a uint32_t with its [msw] and
+ * [lsw] forming the most and least signficant 16-bit words.
+ */
+#define CombineUint16Pair(msw,lsw) (((msw) << 16) | \
+ (((lsw)) & 0xFFFF))
+/* Return the minimum of (a) or (b). */
+#define Min(a, b) (((a) < (b)) ? (a) : (b))
+
/* Allocate [size] bytes and return a pointer to the allocated memory. Abort
* on error.
*/
« no previous file with comments | « src/platform/vboot_reference/include/rollback_index.h ('k') | src/platform/vboot_reference/tests/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698