[haiku-commits] Re: r34091 - in haiku/trunk: headers/compatibility/bsd/sys src/libs/bsd

  • From: Bruno Albuquerque <bga@xxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 17 Nov 2009 14:13:40 -0200

2009/11/17 Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>:
> bga@xxxxxxxxxxxxx wrote:
>> - This is my first attempt at adding something for compatibility
>> reasons. Let
>>   me know if something in wrong.
>
> Only coding style issues:
>
>> +++ haiku/trunk/headers/compatibility/bsd/sys/wait.h  2009-11-17 15:
>> 53:17 UTC (rev 34091)
>> +#include_next <sys/wait.h>
>> +
>> +#include <sys/resource.h>
>> +
>> +#ifdef __cplusplus
>
> Two blank lines between include and the next section.
>
>> +pid_t
>> +wait3(int *status, int options, struct rusage *rusage) {
>> +  return wait4(-1, status, options, rusage);
>> +}
>> +
>> +
>> +pid_t
>> +wait4(pid_t pid, int *status, int options, struct rusage *rusage) {
>
> Opening curly braces go to the next line for functions.
>
> And also:
>
>> -  getrusage(RUSAGE_CHILDREN, rusage);
>> +  if (waitPid != -1) {
>> +     getrusage(RUSAGE_CHILDREN, rusage);
>> +  }
>
> Don't use blocks when they aren't needed (ie. for single line
> statements).

All fixed in r34097. Thanks.

-Bruno

Other related posts: