diff -uNr a/vtools/lib/xalloc.h b/vtools/lib/xalloc.h --- a/vtools/lib/xalloc.h bb116548d11fb1b72bd214fdcbc29bdc260a10783555acb33972f9fea19332da586048e72aed60cf809dab53dacb8d037e12a9de28709e8f1c67aca1e9b9e3de +++ b/vtools/lib/xalloc.h d333128c42000a368c9cc922d9b71ddd408b6a5eaa58e077fbd1cd6e156753f438e5e95fcf375008363773b6d28c5acd5887d467c3dccb157d8716adf617b94b @@ -46,9 +46,9 @@ /* Allocate an array of |n| objects, each with |s| bytes of memory, dynamically, with error checking. |s| must be nonzero. */ -inline void *xnmalloc(size_t n, size_t s); +static inline void *xnmalloc(size_t n, size_t s); -inline void * +static inline void * xnmalloc(size_t n, size_t s) { if (xalloc_oversized (n, s)) xalloc_die(); @@ -59,9 +59,9 @@ |n| objects each of |s| bytes, with error checking. |s| must be nonzero. */ -inline void *xnrealloc(void *p, size_t n, size_t s); +static inline void *xnrealloc(void *p, size_t n, size_t s); -inline void * +static inline void * xnrealloc(void *p, size_t n, size_t s) { if (xalloc_oversized (n, s)) xalloc_die(); diff -uNr a/vtools/manifest b/vtools/manifest --- a/vtools/manifest 86d8b63e1a034dcde84b1fadfcc9e5da14a0a6207beb81bbadd37f32084921e71184b8dc8316ff3fc011527ee60457e5fa0f0b72ac9b9e28f9730f1e9e91cec7 +++ b/vtools/manifest 82c976f07c79876452aebaf0569f69b314f9f7cfeea328c72c1d16fbce5dc80a5ba99553d9ea2b99b606957353a08e390790de5793a13141bfed43c910a35fed @@ -4,3 +4,4 @@ 511300 phf vdiff_keccak Vdiff hashing and output using Keccak instead of SHA512. 512600 phf vtools_fixes_bitrate_char_array Fixes for keccak from diana_coman, different approach to C interop. 514700 phf vtools_vpatch Initial vpatch tool implementation in Ada. +517100 phf vtools_fixes_static_tohex Fixes for xalloc's use of static inline courtesy of spyked, fix broken ToHex implementation diff -uNr a/vtools/src/bits.adb b/vtools/src/bits.adb --- a/vtools/src/bits.adb f9f8125f17b849d7e49d39ff7b8c49d2b9a1acd27b1d7a3fb449d2c9971098d1f22a64263d89d210d8c15b8ad963951d674aa4998e7823c19ab22e03c4f6373a +++ b/vtools/src/bits.adb b400c9418d40715d1063d700657c8cee23e4b6de0d237a23bcbb5293944543de71c1dd0fb0e9984f6dda83b57930906c4c7479a35e88f9d32bd284b5c796dec3 @@ -48,7 +48,7 @@ X: Positive := 1; begin ToString(B, Bytes); - for C of S loop + for C of Bytes loop V := Character'Pos(C); S(I) := Hex_Digits(Integer(Shift_Right(V, 4) + 1)); I := I + 1;