diff options
author | David S. Miller <davem@davemloft.net> | 2010-02-03 19:38:22 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-03 19:38:22 -0800 |
commit | 9c119ba54c0fcae72881948af3d37b47a2f8e1f9 (patch) | |
tree | 0be51b0bf02ece3bb32955e9d33a3998ecd57250 /net/dccp | |
parent | a4b97f2054af2e411c414ed4cb5e1d0dbfd24a47 (diff) | |
parent | fdd3d631cddad20ad9d3e1eb7dbf26825a8a121f (diff) | |
download | linux-9c119ba54c0fcae72881948af3d37b47a2f8e1f9.tar.gz linux-9c119ba54c0fcae72881948af3d37b47a2f8e1f9.tar.bz2 linux-9c119ba54c0fcae72881948af3d37b47a2f8e1f9.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/dccp')
-rw-r--r-- | net/dccp/ccid.c | 2 | ||||
-rw-r--r-- | net/dccp/ccid.h | 8 | ||||
-rw-r--r-- | net/dccp/probe.c | 4 |
3 files changed, 8 insertions, 6 deletions
diff --git a/net/dccp/ccid.c b/net/dccp/ccid.c index 57dfb9c8c4f2..ff16e9df1969 100644 --- a/net/dccp/ccid.c +++ b/net/dccp/ccid.c @@ -83,7 +83,7 @@ static struct kmem_cache *ccid_kmem_cache_create(int obj_size, char *slab_name_f va_list args; va_start(args, fmt); - vsnprintf(slab_name_fmt, sizeof(slab_name_fmt), fmt, args); + vsnprintf(slab_name_fmt, CCID_SLAB_NAME_LENGTH, fmt, args); va_end(args); slab = kmem_cache_create(slab_name_fmt, sizeof(struct ccid) + obj_size, 0, diff --git a/net/dccp/ccid.h b/net/dccp/ccid.h index 269958bf7fe9..6df6f8ac9636 100644 --- a/net/dccp/ccid.h +++ b/net/dccp/ccid.h @@ -19,7 +19,9 @@ #include <linux/list.h> #include <linux/module.h> -#define CCID_MAX 255 +/* maximum value for a CCID (RFC 4340, 19.5) */ +#define CCID_MAX 255 +#define CCID_SLAB_NAME_LENGTH 32 struct tcp_info; @@ -49,8 +51,8 @@ struct ccid_operations { const char *ccid_name; struct kmem_cache *ccid_hc_rx_slab, *ccid_hc_tx_slab; - char ccid_hc_rx_slab_name[32]; - char ccid_hc_tx_slab_name[32]; + char ccid_hc_rx_slab_name[CCID_SLAB_NAME_LENGTH]; + char ccid_hc_tx_slab_name[CCID_SLAB_NAME_LENGTH]; __u32 ccid_hc_rx_obj_size, ccid_hc_tx_obj_size; /* Interface Routines */ diff --git a/net/dccp/probe.c b/net/dccp/probe.c index bace1d8cbcfd..f5b3464f1242 100644 --- a/net/dccp/probe.c +++ b/net/dccp/probe.c @@ -161,8 +161,8 @@ static __init int dccpprobe_init(void) if (!proc_net_fops_create(&init_net, procname, S_IRUSR, &dccpprobe_fops)) goto err0; - ret = try_then_request_module((register_jprobe(&dccp_send_probe) == 0), - "dccp"); + try_then_request_module((ret = register_jprobe(&dccp_send_probe)) == 0, + "dccp"); if (ret) goto err1; |