Re: [Toybox] [toybox] cleanup in 'netstat.c'
(i'll merge it tonight or tomorrow to maximize the testing it gets.) On Thu, Jan 21, 2016 at 11:33 AM, Rob Landley wrote: > On Thu, Jan 21, 2016 at 4:04 AM, Lipi C. H. Lee wrote: >> Hi, Rob. >> >> I cleaned up the code in 'netstat.c' as belows. >> >> - Adjust to 80 columns >> - remove a useless function(strchr_nul), variable, type casting and compile >> warnings(fgets) >> - clean up netstat command option condition >> - change useless double pointer to single point and dynamic memory >> allocation to static one >> - fix a ambiguous return type and typo >> >> Can you review it? > > It makes it build without warnings, I call that a net win, and am applying it. > > That said, I don't regularly use anything in pending and won't notice > if it causes nonobvious regressions. Android _is_ using some commands > out of pending (I know!) and that's one of them, so heads up Elliott > in case it broke anything for him/android. > > I'm too close to the next release to add another can of worms just now > (this cycle I promoted pgrep, pkill, and top out of pending, that's > enough for one release), so I'm not doing any of my own cleanup to > netstat yet. At this point if it doesn't get sucked into the PS vortex > it's out of scope for 0.6.2. (Or possibly I should call it 7.0, since > the utf8 fontmetrics and linestack stuff has been a big blocker on a > lot of things?) > > Rob -- Elliott Hughes - http://who/enh - http://jessies.org/~enh/ Android native code/tools questions? Mail me/drop by/add me as a reviewer. ___ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net
Re: [Toybox] [toybox] cleanup in 'netstat.c'
On Thu, Jan 21, 2016 at 4:04 AM, Lipi C. H. Lee wrote: > Hi, Rob. > > I cleaned up the code in 'netstat.c' as belows. > > - Adjust to 80 columns > - remove a useless function(strchr_nul), variable, type casting and compile > warnings(fgets) > - clean up netstat command option condition > - change useless double pointer to single point and dynamic memory > allocation to static one > - fix a ambiguous return type and typo > > Can you review it? It makes it build without warnings, I call that a net win, and am applying it. That said, I don't regularly use anything in pending and won't notice if it causes nonobvious regressions. Android _is_ using some commands out of pending (I know!) and that's one of them, so heads up Elliott in case it broke anything for him/android. I'm too close to the next release to add another can of worms just now (this cycle I promoted pgrep, pkill, and top out of pending, that's enough for one release), so I'm not doing any of my own cleanup to netstat yet. At this point if it doesn't get sucked into the PS vortex it's out of scope for 0.6.2. (Or possibly I should call it 7.0, since the utf8 fontmetrics and linestack stuff has been a big blocker on a lot of things?) Rob ___ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net
Re: [Toybox] [toybox] cleanup in 'netstat.c'
i'm pretty sure a lot of the reformatting here doesn't match rob's intended style. it would be nice to have a .clang-format checked in that's close enough to rob's intended style that we can just automate this to be "good enough" and forget about it... On Thu, Jan 21, 2016 at 2:04 AM, Lipi C. H. Lee wrote: > Hi, Rob. > > I cleaned up the code in 'netstat.c' as belows. > > - Adjust to 80 columns > - remove a useless function(strchr_nul), variable, type casting and compile > warnings(fgets) > - clean up netstat command option condition > - change useless double pointer to single point and dynamic memory > allocation to static one > - fix a ambiguous return type and typo > > Can you review it? > > Thanks > > Lipi -- Elliott Hughes - http://who/enh - http://jessies.org/~enh/ Android native code/tools questions? Mail me/drop by/add me as a reviewer. ___ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net