ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/memory.c
(Generate patch)

Comparing ircd-hybrid/trunk/src/memory.c (file contents):
Revision 8663 by michael, Tue Feb 20 19:30:13 2018 UTC vs.
Revision 8664 by michael, Thu Nov 22 14:26:32 2018 UTC

# Line 100 | Line 100 | xstrndup(const char *s, size_t len)
100   void
101   outofmemory(void)
102   {
103 <  static int was_here = 0;
103 >  static bool was_here = false;
104  
105 <  if (was_here++)
105 >  if (was_here == false)
106 >  {
107 >    was_here = true;
108      abort();
109 +  }
110  
111    server_die("out of memory", SERVER_RESTART);
112   }

Diff Legend

– Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)