| > --- a/include/linux/dccp.h
| > +++ b/include/linux/dccp.h
| >
| > +
| > +static int dccp_feat_default_value(u8 feat_num)
| > +{
| > + int idx = dccp_feat_index(feat_num);
| > +
| > + return idx < 0 ? : dccp_feat_table[idx].default_value;
| > +}
|
| [acme@doppio ~]$ cat dd.c
| #include
|
| int main(void)
| {
| int idx = -2;
|
| printf("%d\n", idx < 0 ? : 10);
| printf("%d\n", idx < 0 ? idx : 10);
| return 0;
| }
| [acme@doppio ~]$ ./dd
| 1
| -2
| [acme@doppio ~]$
|
| Which one do you want? The boolean result as the value to be returned or
| the index if it is < 0?
|
It is the first value. The test is only there to avoid accessing the
array with an invalid index, which would happen if an unknown `feat_num'
is passed - as for unknown features there is no default value.| I tried to check on the other 4 patches on this series to check if usage
| clarified if it was correct, but there is no use of
| dccp_feat_default_value() on this 5 patches, perhaps it could be
| deferred to when it actually gets used?
|
Yes thanks, while I have ensured that all patches are bisectable, a few
functions may be declared where the logical fit was better. I will place
it where it is first used, in the patch entitled "dccp: Registration
routines for changing feature values"I am waiting before resubmitting - please take a look at patches 3-5 as well.
Gerrit
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
| Jon Smirl | 463 kernel developers missing! |
| Nigel Cunningham | Re: [PATCH] Remove process freezer from suspend to RAM pathway |
| Greg KH | Re: [malware-list] [RFC 0/5] [TALPA] Intro to a linux interface for on access scan... |
| Jeff Garzik | Re: Linux 2.6.23-rc9 and a heads-up for the 2.6.24 series.. |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Linus Torvalds | Re: [GIT]: Networking |
| Evgeniy Polyakov | Re: [BUG] New Kernel Bugs |
