1. 03 Jun, 2016 1 commit
  2. 02 Jun, 2016 2 commits
    • Explorer09's avatar
      Add assert and __attribute__((nonnull)) on xStrdup · 3297616e
      Explorer09 authored
      __attribute__((nonnull)) will help catching "calling with NULL" mistake on
      compile time.
      
      I also convert xStrdup into a macro, that will do assert() inline when the
      code is *not* built with -DNDEBUG . For release builds (with -DNDEBUG),
      preprocessor trick will ensure that generated code remains the same.
      3297616e
    • Explorer09's avatar
      Don't check if (!str) in xStrdup · e288f690
      Explorer09 authored
      This effectively reverts "Stricter strdup." 4674b4a7
      
      If str is NULL upon the calling of strdup(), it should crash with SIGSEGV.
      Just let it crash. Adding the "if (!str) fail();" code serves nothing but
      bloat.
      e288f690
  3. 30 May, 2016 1 commit
  4. 11 Mar, 2016 1 commit
    • Explorer09's avatar
      Revert 5c593fae (xCalloc) · 7d3f67e8
      Explorer09 authored
      calloc() allows 'nmemb' or 'size' to be zero, in which case NULL may be
      returned. Letting htop die because of either argument being zero doesn't
      make sense.
      
      As a side note: As size_t is unsigned, compiler should be able to optimize
      conditional (nmemb > 0 && size > 0) to (nmemb && size). This theorically
      shouldn't increase code size too much.
      7d3f67e8
  5. 03 Feb, 2016 2 commits
  6. 02 Feb, 2016 2 commits
  7. 31 Jan, 2016 1 commit