1. 03 Aug, 2017 1 commit
    • Philip Withnall's avatar
      Consistently save errno immediately after the operation setting it · 5cddde1f
      Philip Withnall authored
      Prevent the situation where errno is set by function A, then function B
      is called (which is typically _(), but could be anything else) and it
      overwrites errno, then errno is checked by the caller.
      
      errno is a horrific API, and we need to be careful to save its value as
      soon as a function call (which might set it) returns. i.e. Follow the
      pattern:
        int errsv, ret;
        ret = some_call_which_might_set_errno ();
        errsv = errno;
      
        if (ret < 0)
          puts (strerror (errsv));
      
      This patch implements that pattern throughout GLib. There might be a few
      places in the test code which still use errno directly. They should be
      ported as necessary. It doesn’t modify all the call sites like this:
        if (some_call_which_might_set_errno () && errno == ESOMETHING)
      since the refactoring involved is probably more harmful than beneficial
      there. It does, however, refactor other call sites regardless of whether
      they were originally buggy.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=785577
      5cddde1f
  2. 29 May, 2017 1 commit
  3. 12 Oct, 2016 1 commit
  4. 31 Jan, 2014 1 commit
  5. 01 Jan, 2014 1 commit
  6. 04 Jul, 2012 1 commit
  7. 21 Nov, 2010 1 commit
  8. 07 Jul, 2010 1 commit
  9. 06 May, 2010 1 commit
  10. 12 Jan, 2010 1 commit
  11. 30 Nov, 2009 1 commit
  12. 23 Nov, 2009 2 commits