1. 31 Jan, 2014 25 commits
  2. 27 Jan, 2014 1 commit
  3. 07 Jan, 2014 2 commits
  4. 02 Jan, 2014 4 commits
  5. 27 Dec, 2013 1 commit
  6. 24 Dec, 2013 3 commits
  7. 23 Dec, 2013 1 commit
  8. 18 Dec, 2013 3 commits
    • Philip Withnall's avatar
    • Philip Withnall's avatar
      stun: Fix a use of a function with an aggregate return value · 3e29fec4
      Philip Withnall authored
      div() has an aggregate return, which GCC doesn’t like, although this
      seems like a pretty pointless warning because div_t is the same size as
      a pointer on 64-bit platforms (probably) and hardly going to cause
      performance problems by passing it by value.
      Anyway, it seems easier to simplify the code by using explicit / and %
      operators inline, than it does to add pragmas and shut the warning up.
    • Philip Withnall's avatar
      stun: Explicitly avoid a memcpy() from NULL · 869093b3
      Philip Withnall authored
      If stun_message_append_bytes() is called through
      stun_message_append_flag(), data will be NULL and len will be 0. This
      will result in a memcpy(ptr, NULL, 0) call. This probably won’t do any
      harm (since any reasonable memcpy() implementation will immediately
      return if (len == 0)), but the standard allows for memcpy() to explode
      if (data == NULL), regardless of the value of len.
      In order to be conformant, and to shut up the scan-build static analysis
      warning about it, only do the memcpy() if (len > 0).