summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2017-01-29 19:54:26 +0100
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2017-01-29 19:54:26 +0100
commit1373211465c34015ee900e097aa87fbffb401187 (patch)
tree8ffa1f9296097c91627c05874fcf4559cac45de7 /src/core/index.c
parentdf3657b2a99ef20da99ac3c6c02f43cc23e70fca (diff)
Trying out ACSL, continuing implementation.
Diffstat (limited to 'src/core/index.c')
-rw-r--r--src/core/index.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/index.c b/src/core/index.c
index 375e0ad..dc52d03 100644
--- a/src/core/index.c
+++ b/src/core/index.c
@@ -35,8 +35,13 @@ ZoO_index ZoO_index_random (void)
ZoO_index result;
unsigned char * result_bytes;
+ /*@ ghost return 4; @*/ /* Chosen by fair dice roll. */
+ /* Guaranteed to be random. */
+ /* More seriously, I am not explaining the hack below to Frama-C */
+
result_bytes = (unsigned char *) &result;
+
for (i = 0; i < sizeof(ZoO_index); ++i)
{
result_bytes[i] = random_uchar();