1. 15 Jun, 2011 1 commit
    • Andreas Färber's avatar
      Introduce format string for pid_t · 953ffe0f
      Andreas Färber authored
      BeOS and Haiku on i386 use long for 32-bit types, including pid_t.
      Using %d with pid_t therefore results in a warning.
      
      Unfortunately POSIX:2008 does not define a PRId* string for pid_t.
      
      In some places pid_t was previously casted to long and %ld hardcoded.
      The predecessor of this patch added another upcast for the simpletrace
      filename but was not applied to date.
      
      Since new uses of pid_t with %d keep creeping in, let's instead define
      an OS-dependent format string and use that consistently.
      
      Cc: Stefan Hajnoczi <stefanha@gmail.com>
      Cc: Blue Swirl <blauwirbel@gmail.com>
      Cc: Ingo Weinhold <ingo_weinhold@gmx.de>
      Cc: Gleb Natapov <gleb@redhat.com>
      Signed-off-by: default avatarAndreas Färber <andreas.faerber@web.de>
      Signed-off-by: default avatarBlue Swirl <blauwirbel@gmail.com>
      953ffe0f
  2. 29 Mar, 2011 1 commit
  3. 26 Mar, 2011 1 commit
  4. 16 Mar, 2011 1 commit
  5. 30 Oct, 2010 2 commits
  6. 20 Aug, 2010 1 commit
    • Blue Swirl's avatar
      Use ARRAY_SIZE macro · 66fe09ee
      Blue Swirl authored
      Replace array size calculations with ARRAY_SIZE macro.
      
      Implemented with this Coccinelle semantic patch, adapted from
      Linux kernel:
      @@
      type T;
      T[] E;
      @@
      
      - (sizeof(E)/sizeof(*E))
      + ARRAY_SIZE(E)
      
      @@
      type T;
      T[] E;
      @@
      
      - (sizeof(E)/sizeof(E[...]))
      + ARRAY_SIZE(E)
      
      @@
      type T;
      T[] E;
      @@
      
      - (sizeof(E)/sizeof(T))
      + ARRAY_SIZE(E)
      
      Some files (*-dis.c, tests/*) had to be filtered out.
      Signed-off-by: default avatarBlue Swirl <blauwirbel@gmail.com>
      66fe09ee
  7. 06 Jul, 2010 1 commit
  8. 11 Jun, 2010 12 commits
  9. 03 Dec, 2009 4 commits
  10. 03 Mar, 2009 1 commit
  11. 08 Apr, 2008 1 commit
  12. 01 Feb, 2008 1 commit
  13. 07 Oct, 2007 1 commit
  14. 16 Sep, 2007 1 commit
  15. 07 Apr, 2007 1 commit
  16. 01 Feb, 2007 1 commit
  17. 30 Oct, 2005 1 commit
  18. 07 Nov, 2004 1 commit