[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [BusyBox] getty and login utmp handling
From:       Rob Landley <rob () landley ! net>
Date:       2004-08-25 18:54:03
Message-ID: 200408251354.03755.rob () landley ! net
[Download RAW message or body]

On Tuesday 24 August 2004 05:43, Manousaridis Angelos wrote:
> -               creat(_PATH_UTMP, 0664);
> +               int fd = creat(_PATH_UTMP, 0664);
> +               close(fd);

Declaring fd just makes the code longer here, you might as well just go 
close(create(...))

I realise that this almost certainly optimized away anyway, but I think it 
makes it shorter and simpler to read, since you're not using fd to do any 
error checking or anything (which would be superfluous if close(-1) doesn't 
barf on you)...

This being a nit-pick, I'll happily wait until after 1.0 to actually suggest a 
patch. :)

Rob
-- 
www.linucon.org: Linux Expo and Science Fiction Convention
October 8-10, 2004 in Austin Texas.  (I'm the con chair.)

_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic