From e72a763019948c2ff60a681e43538ecef399a52e Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Sat, 1 Jun 2013 16:58:21 +0000
Subject: [PATCH] volatile

---
 apps/addressbook/java/src/net/i2p/addressbook/Daemon.java | 2 +-
 core/java/src/gnu/crypto/prng/BasePRNGStandalone.java     | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/apps/addressbook/java/src/net/i2p/addressbook/Daemon.java b/apps/addressbook/java/src/net/i2p/addressbook/Daemon.java
index 578a348e37..82509a643a 100644
--- a/apps/addressbook/java/src/net/i2p/addressbook/Daemon.java
+++ b/apps/addressbook/java/src/net/i2p/addressbook/Daemon.java
@@ -47,7 +47,7 @@ import net.i2p.util.SecureDirectory;
 public class Daemon {
     public static final String VERSION = "2.0.4";
     private static final Daemon _instance = new Daemon();
-    private boolean _running;
+    private volatile boolean _running;
     private static final boolean DEBUG = false;
     
     /**
diff --git a/core/java/src/gnu/crypto/prng/BasePRNGStandalone.java b/core/java/src/gnu/crypto/prng/BasePRNGStandalone.java
index 4b88e0f0b5..63556cc795 100644
--- a/core/java/src/gnu/crypto/prng/BasePRNGStandalone.java
+++ b/core/java/src/gnu/crypto/prng/BasePRNGStandalone.java
@@ -58,10 +58,10 @@ public abstract class BasePRNGStandalone implements IRandomStandalone {
    protected final String name;
 
    /** Indicate if this instance has already been initialised or not. */
-   protected boolean initialised;
+   protected volatile boolean initialised;
 
    /** A temporary buffer to serve random bytes. */
-   protected byte[] buffer;
+   protected volatile byte[] buffer;
 
    /** The index into buffer of where the next byte will come from. */
    protected int ndx;
-- 
GitLab