- 03 Jun, 2016 1 commit
-
-
Explorer09 authored
-
- 02 Jun, 2016 2 commits
-
-
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.
-
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.
-
- 30 May, 2016 1 commit
-
-
Hisham authored
-
- 11 Mar, 2016 1 commit
-
-
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.
-
- 03 Feb, 2016 2 commits
- 02 Feb, 2016 2 commits
- 31 Jan, 2016 1 commit
-
-
Hisham authored
-