On Tue, Jun 18, 2013 at 11:31:13AM -0400, Calvin Morrison wrote:
> is there an interest in having the logname tool?
> 
> I have a basic implementation of it here:
> 
> https://github.com/mutantturkey/corefutiles/blob/master/logname.c

Some personal comments:
* Weird indentation. What coding style is this?
* A default return value of 1 is uncommon
* The end of a function does not need a semicolon

My try is attached.

Kind regards,
-Alexander Huemer
/* See LICENSE file for copyright and license details. */

#include <unistd.h>
#include <stdio.h>

int main(void)
{
	char *login;

	login = getlogin();

	if (!login)
		return 1;

	puts(login);

	return 0; 
};

Reply via email to