1. 08 Aug, 2019 27 commits
  2. 06 Aug, 2019 1 commit
  3. 18 Jun, 2018 9 commits
  4. 17 Jun, 2018 3 commits
    • Guillem Jover's avatar
      Remove dead code in vis · 5e0998fa
      Guillem Jover authored
      The loop only executes while len > 0, and the trinary operator in the
      function argument is checking against len >= 1 which will always be
      true.
      
      Warned-by: coverity
      5e0998fa
    • Guillem Jover's avatar
      Fix vis family of functions to not leak · 8e2d5504
      Guillem Jover authored
      The code uses an internal helper function to avoid code repetition. But
      to get there, the function takes a pointer to a pointer, so that the few
      functions that require returning an allocated buffer can get hold of it
      this way.
      
      The problem is that the user might pass a NULL pointer and trigger an
      internal allocation even if the functions are not expected to do so.
      
      Add a new internal helper for non-allocations, that will assert that
      condition, and make any other function that requires this behavior call
      this one instead.
      
      Warned-by: coverity
      8e2d5504
    • Baruch Siach's avatar
      flopen: Add missing <fcntl.h> include · 13c32916
      Baruch Siach authored
      Commit 993828d8 (Add flopenat() function from FreeBSD) dropped the
      fcntl.h header. This breaks the build with musl libc:
      
      flopen.c: In function ‘vflopenat’:
      flopen.c:60:14: error: ‘O_CREAT’ undeclared (first use in this function)
        if (flags & O_CREAT) {
                    ^~~~~~~
      
      Restore the fcntl.h header include to fix the build.
      
      Fixes: commit 993828d8Submitted-also-by: default avatarparazyd <parazyd@dyne.org>
      Signed-off-by: default avatarBaruch Siach <baruch@tkos.co.il>
      Signed-off-by: Guillem Jover's avatarGuillem Jover <guillem@hadrons.org>
      13c32916