]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2831] corrected example code in doc
authorJINMEI Tatuya <jinmei@isc.org>
Tue, 9 Apr 2013 23:46:59 +0000 (16:46 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Tue, 9 Apr 2013 23:46:59 +0000 (16:46 -0700)
src/lib/util/memory_segment.h

index c31e745e37a414de74d0a356a8a2cb0cd318acaf..ae7bc91e2aa97f24235007d6471351db38a83c7f 100644 (file)
@@ -87,8 +87,8 @@ public:
     /// multiple calls to \c allocate():
     ///
     /// \code
-    /// ComplicatedStuff* stuff;
-    /// while (true) { // this must eventually succeed or result in bad_alloc
+    /// ComplicatedStuff* stuff = NULL;
+    /// while (!stuff) { // this must eventually succeed or result in bad_alloc
     ///     try {
     ///         // create() is a factory method, takes a memory segment
     ///         // and calls allocate() on it multiple times.  create()