Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327549
b: refs/heads/master
c: 3812943
h: refs/heads/master
i:
  327547: 784f8bd
v: v3
  • Loading branch information
Ying Xue authored and David S. Miller committed Aug 20, 2012
1 parent 69618c9 commit ae43f06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fc0739385ba10f59105e87a46cc93d9d9a10553c
refs/heads/master: 381294331ed2858f8e75223310f873d580921366
17 changes: 1 addition & 16 deletions trunk/net/tipc/bearer.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,6 @@ struct tipc_bearer tipc_bearers[MAX_BEARERS];

static void bearer_disable(struct tipc_bearer *b_ptr);

/**
* media_name_valid - validate media name
*
* Returns 1 if media name is valid, otherwise 0.
*/
static int media_name_valid(const char *name)
{
u32 len;

len = strlen(name);
if ((len + 1) > TIPC_MAX_MEDIA_NAME)
return 0;
return 1;
}

/**
* tipc_media_find - locates specified media object by name
*/
Expand Down Expand Up @@ -102,7 +87,7 @@ int tipc_register_media(struct tipc_media *m_ptr)

write_lock_bh(&tipc_net_lock);

if (!media_name_valid(m_ptr->name))
if ((strlen(m_ptr->name) + 1) > TIPC_MAX_MEDIA_NAME)
goto exit;
if ((m_ptr->bcast_addr.media_id != m_ptr->type_id) ||
!m_ptr->bcast_addr.broadcast)
Expand Down

0 comments on commit ae43f06

Please sign in to comment.