tcpdump mailing list archives
Re: [clearview-discuss] libdlpi with libpcap
From: Guy Harris <guy () alum mit edu>
Date: Tue, 29 Jan 2008 13:50:26 -0800
Peter Memishian wrote:
> I mostly fixed the comment changes, thinking they were trivial and left > other Sun cstyle error alone. I can see how it is distracting while > reviewing the actual changes.It's more than distracting -- it's incorrect. Code for libpcap follows its own style
It does? :-)Most files mostly use something akin to ANSI C-ified KNF (not surprising, given that LBL is run by UCB :-)), which was the Sun style back when I was there (in the days when dinosaurs^WSun-3's walked the earth).
That's largely the style I use, but I've gotten into the habit of leaving parentheses out of the value in a return statement, but I might've let that creep into stuff I've written in libpcap - on the other hand, there was a mix of "return x;" and "return (x);" back in libpcap 0.4, long before I had anything to do with it.
Some files added later, and pcap-linux.c after it was rewritten from scratch to that it actually worked right, have styles that are a bit different.
So there isn't really *a* style.
and must not be changed to conform to Sun's cstyle.
So what *were* the changes?
Likewise, new files like pcap-libdlpi.c need to follow the existing libpcap style.
...except that, at least in the case of, for example, return statements, there *is* no existing style, even if you include only the files that were there in libpcap 0.4.
- This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- Re: [clearview-discuss] libdlpi with libpcap sagun shakya (Jan 27)
- Re: [clearview-discuss] libdlpi with libpcap Peter Memishian (Jan 28)
- Re: [clearview-discuss] libdlpi with libpcap sagun shakya (Jan 28)
- Re: [clearview-discuss] libdlpi with libpcap Peter Memishian (Jan 29)
- Re: [clearview-discuss] libdlpi with libpcap sagun shakya (Jan 28)
- Re: [clearview-discuss] libdlpi with libpcap Guy Harris (Jan 29)
- Re: [clearview-discuss] libdlpi with libpcap sagun shakya (Jan 29)
- Re: [clearview-discuss] libdlpi with libpcap Peter Memishian (Jan 30)
- Re: [clearview-discuss] libdlpi with libpcap sagun shakya (Jan 28)
- Re: [clearview-discuss] libdlpi with libpcap Guy Harris (Jan 30)
- Re: [clearview-discuss] libdlpi with libpcap sagun shakya (Jan 30)
- Re: [clearview-discuss] libdlpi with libpcap sagun shakya (Jan 30)
- Re: [clearview-discuss] libdlpi with libpcap sagun shakya (Jan 31)
- Re: [clearview-discuss] libdlpi with libpcap Sebastien Roy (Feb 01)
- Re: [clearview-discuss] libdlpi with libpcap Peter Memishian (Feb 01)
- Re: [clearview-discuss] libdlpi with libpcap sagun shakya (Feb 01)
- Re: [clearview-discuss] libdlpi with libpcap Guy Harris (Feb 01)
- Re: [clearview-discuss] libdlpi with libpcap Peter Memishian (Jan 28)
