Skip to content
Snippets Groups Projects
  1. Jun 17, 2017
  2. Jun 14, 2017
    • Colin Walters's avatar
      Add G_IN_SET, patch our internal users via spatch · 9a1b77ef
      Colin Walters authored
      I originally tried to get this into GLib:
      https://bugzilla.gnome.org/show_bug.cgi?id=783751
      
      But that looks like it's going to fail due to MSVC. Let's add it here at least
      so I can start using it tomorrow and not wait for the MSVC team to catch up.
      
      I renamed `glnx-alloca.h` to `glnx-macros.h` as a more natural collective
      home for things from systemd's `macro.h`.
      
      Finally, I used a Coccinelle spatch similar to the one referenced
      in the above BZ to patch our uses.
      9a1b77ef
  3. May 11, 2017
  4. Apr 21, 2017
  5. Mar 24, 2017
  6. Mar 23, 2017
    • Jonathan Lebon's avatar
      glnx-errors.h: add glnx_null_throw[_*] variants · 0c52d85e
      Jonathan Lebon authored
      These are equivalent to the non-null throw, except that the returned
      value is a NULL pointer. They can be used in functions where one wants
      to return a pointer. E.g.:
      
      	GKeyFile *foo(GError **error) {
      		return glnx_null_throw (error, "foobar");
      	}
      
      The function call redirections are wrapped around a compound statement
      expression[1] so that they represent a single top-level expression. This
      allows us to avoid -Wunused-value warnings vs using a comma operator if
      the return value isn't used.
      
      I made the 'args...' absorb the fmt argument as well so that callers can
      still use it without always having to specify at least one additional
      variadic argument. I had to check to be sure that the expansion is all
      done by the preprocessor, so we don't need to worry about stack
      intricacies.
      
      [1] https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html
      0c52d85e
  7. Mar 22, 2017
  8. Mar 02, 2017
  9. Feb 21, 2017
    • Colin Walters's avatar
      tests/xattrs: Fix possible NULL allocation · 0c1603de
      Colin Walters authored
      This showed up in the ostree runs with `-fsanitize=undefined` - if we happened
      to get `0` then `g_malloc` would return `NULL`. However, what's interesting is
      it seemed to happen *consistently*. I think what's going on is GCC proved that
      the value *could* be zero, and hence it *could* return NULL, and hence it was
      undefined behavior. Hooray for `-fsanitize=undefined`.
      0c1603de
  10. Jan 29, 2017
Loading