[Toybox] [CLEANUP] ifconfig commit 906

2013-05-21 Thread Rob Landley
http://landley.net/hg/toybox/rev/906 I started by doing the table cleanup I mentioned last message, bringing the table back down to three members. I took out the array and made all three members separate, called name, on, and off, and just had the flag setting logic doing two ? : swaps to

[Toybox] [CLEANUP] ifconfig commit 907

2013-05-21 Thread Rob Landley
http://landley.net/hg/toybox/rev/907 --- show_ip_addr The function show_ip_addr() is only ever called from display_ifconfig. It's called four times in a row, so it's better to have it be a function that repeated inline four times. However, it's even better to have it be the body of a loop

Re: [Toybox] Regarding if() condition in dirtree_add_node

2013-05-21 Thread Rob Landley
On 05/21/2013 12:36:41 AM, Sandeep Sharma wrote: Hi Rob, I have came across a condition in dirtree_add_node(), where we are reading the link even though symfollow is not set :- if (S_ISLNK(st.st_mode) { if (0(linklen = readlinkat(fd, name, buf,