mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
tools/nxstyle.c: Fix logic error that prevent detecion of '/' and '/=' as operators. net/: Minor updates resulting from testing tools/nxstyle.
This commit is contained in:
@@ -309,15 +309,16 @@ int psock_local_connect(FAR struct socket *psock,
|
||||
|
||||
case LOCAL_TYPE_PATHNAME: /* lc_path holds a null terminated string */
|
||||
{
|
||||
if (strncmp(conn->lc_path, unaddr->sun_path, UNIX_PATH_MAX-1) == 0)
|
||||
if (strncmp(conn->lc_path, unaddr->sun_path, UNIX_PATH_MAX - 1)
|
||||
== 0)
|
||||
{
|
||||
int ret = OK;
|
||||
|
||||
/* Bind the address and protocol */
|
||||
|
||||
client->lc_proto = conn->lc_proto;
|
||||
strncpy(client->lc_path, unaddr->sun_path, UNIX_PATH_MAX-1);
|
||||
client->lc_path[UNIX_PATH_MAX-1] = '\0';
|
||||
strncpy(client->lc_path, unaddr->sun_path, UNIX_PATH_MAX - 1);
|
||||
client->lc_path[UNIX_PATH_MAX - 1] = '\0';
|
||||
client->lc_instance_id = local_generate_instance_id();
|
||||
|
||||
/* The client is now bound to an address */
|
||||
|
||||
Reference in New Issue
Block a user