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:
Gregory Nutt
2019-03-11 12:48:17 -06:00
parent 0a7f7642c0
commit f6b00e1966
77 changed files with 473 additions and 283 deletions
+4 -3
View File
@@ -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 */