diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2006-09-06 21:25:15 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2006-09-06 21:25:15 +0000 |
commit | 392e3edc3d7e6d9f9ad1a3dee3a7efa858b9ee41 (patch) | |
tree | e89fd31f44eb57ed02f2fc72cd80f0e84520e1d6 /xpp/xbus-core.c | |
parent | 274b05030f73aeb95301c619b86edcf3967bba17 (diff) |
Fix problems reported by sparse
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1423 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/xbus-core.c')
-rw-r--r-- | xpp/xbus-core.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/xpp/xbus-core.c b/xpp/xbus-core.c index 615d499..961c361 100644 --- a/xpp/xbus-core.c +++ b/xpp/xbus-core.c @@ -103,7 +103,7 @@ static atomic_t xpacket_count = ATOMIC_INIT(0); * Receive packets: * - Allocated/deallocated by xbus_xmiter */ -xpacket_t *xbus_packet_new(xbus_t *xbus, int flags) +xpacket_t *xbus_packet_new(xbus_t *xbus, gfp_t flags) { xpacket_t *pack; @@ -787,15 +787,14 @@ out: #ifdef PROTOCOL_DEBUG static int proc_xbus_command_write(struct file *file, const char __user *buffer, unsigned long count, void *data) { - const int NUM_SIZE = 100; - char buf[NUM_SIZE]; + char buf[MAX_PROC_WRITE]; xbus_t *xbus = data; xpacket_t *pack; char *p; byte *pack_contents; byte *q; - if(count >= NUM_SIZE) { + if(count >= MAX_PROC_WRITE) { ERR("%s: line too long\n", __FUNCTION__); return -EFBIG; } @@ -967,7 +966,7 @@ int __init xbus_core_init(void) return -ENOMEM; } #ifdef CONFIG_PROC_FS - proc_xbuses = create_proc_read_entry(PROC_XBUSES, 0444, xpp_proc_toplevel, read_proc_xbuses, 0); + proc_xbuses = create_proc_read_entry(PROC_XBUSES, 0444, xpp_proc_toplevel, read_proc_xbuses, NULL); if (!proc_xbuses) { ERR("Failed to create proc file %s\n", PROC_XBUSES); xbus_core_cleanup(); |