[vitunes-commits] [ryanflannery/vitunes] 3ad846: Remove __ prefix on #defines

  • From: Ryan Flannery <ryan.flannery@xxxxxxxxx>
  • To: vitunes-commits@xxxxxxxxxxxxx
  • Date: Sat, 28 Jan 2012 10:49:40 -0800

  Branch: refs/heads/master
  Home:   https://github.com/ryanflannery/vitunes
  Commit: 3ad8460a461ade8d7566840e2bf1ef52224b76bc
  Author: Ryan Flannery <ryan.flannery@xxxxxxxxx>
  Date:   2012-01-28 (Sat, 28 Jan 2012)

  Changed paths:
    M socket.h

  Log Message:
  Remove __ prefix on #defines

From Tiago Cunha:

ANSI C reserves identifiers that begin with two underscores for
compiler use.

  Commit: 1ae9828f4580dd0e0031395a8faf16b25dbf8e96
  Author: Ryan Flannery <ryan.flannery@xxxxxxxxx>
  Date:   2012-01-28 (Sat, 28 Jan 2012)

  Changed paths:
    M commands.c
  M keybindings.c
  M meta_info.c
  M vitunes.c

  Log Message:
  Correct usage of asprintf(3)

From Tiago Cunha:

Previous use of asprintf(3) relied on implementation-specific behavior
of setting the destination pointer to NULL, rather than on the defined
behavior of returning -1.

From asprintf(3):
   If sufficient space cannot be allocated, these functions will
   return -1.  The value of ret in this situation is
   implementation-dependent (on OpenBSD, ret will be set to the null
   pointer, but this behavior should not be relied upon).

This corrects that.

Compare: https://github.com/ryanflannery/vitunes/compare/d24abed...1ae9828

Other related posts:

  • » [vitunes-commits] [ryanflannery/vitunes] 3ad846: Remove __ prefix on #defines - Ryan Flannery