On 09/10/2012 05:42 AM, Jim Meyering wrote:
> - sprintf (name, "diff%s %s %s", switch_string, names[0], names[1]);
> + name = xasprintf ("diff%s %s %s", switch_string, names[0], names[1]);
>
> if (paginate)
Could I suggest migrating that assignment to 'name'
so that it's inside the then-part of the 'if (paginate)'?
That way, the else-part can call printf instead of
xasprintf, without worrying about memory allocation,
and the memory allocation is needed only in the rare
case when the --paginate option is used.