Fix some spacing problems

This commit is contained in:
Gregory Nutt
2015-10-04 15:04:00 -06:00
parent 863ded3584
commit 0b12dbf95d
88 changed files with 226 additions and 229 deletions
+30 -30
View File
@@ -144,17 +144,17 @@ b16_t b16mulb16(b16_t m1, b16_t m2)
ub16_t ub16mulub16(ub16_t m1, ub16_t m2)
{
/* Let:
*
* m1 = m1i*2**16 + m1f (b16)
* m2 = m2i*2**16 + m2f (b16)
*
* Then:
*
* m1*m2 = (m1i*m2i)*2**32 + (m1i*m2f + m2i*m1f)*2**16 + m1f*m2f (b32)
* = (m1i*m2i)*2**16 + (m1i*m2f + m2i*m1f) + m1f*m2f*2**-16 (b16)
* = a*2**16 + b + c*2**-16
*/
/* Let:
*
* m1 = m1i*2**16 + m1f (b16)
* m2 = m2i*2**16 + m2f (b16)
*
* Then:
*
* m1*m2 = (m1i*m2i)*2**32 + (m1i*m2f + m2i*m1f)*2**16 + m1f*m2f (b32)
* = (m1i*m2i)*2**16 + (m1i*m2f + m2i*m1f) + m1f*m2f*2**-16 (b16)
* = a*2**16 + b + c*2**-16
*/
uint32_t m1i = ((uint32_t)m1 >> 16);
uint32_t m2i = ((uint32_t)m1 >> 16);
@@ -195,15 +195,15 @@ b16_t b16sqr(b16_t a)
ub16_t ub16sqr(ub16_t a)
{
/* Let:
*
* m = mi*2**16 + mf (b16)
*
* Then:
*
* m*m = (mi*mi)*2**32 + 2*(m1*m2)*2**16 + mf*mf (b32)
* = (mi*mi)*2**16 + 2*(mi*mf) + mf*mf*2**-16 (b16)
*/
/* Let:
*
* m = mi*2**16 + mf (b16)
*
* Then:
*
* m*m = (mi*mi)*2**32 + 2*(m1*m2)*2**16 + mf*mf (b32)
* = (mi*mi)*2**16 + 2*(mi*mf) + mf*mf*2**-16 (b16)
*/
uint32_t mi = ((uint32_t)a >> 16);
uint32_t mf = ((uint32_t)a & 0x0000ffff);
@@ -235,16 +235,16 @@ ub16_t ub16divub16(ub16_t num, ub16_t denom)
uint32_t numf;
uint32_t product;
/* Let:
*
* num = numi*2**16 + numf (b16)
* den = deni*2**16 + denf (b16)
*
* Then:
*
* num/den = numi*2**16 / den + numf / den (b0)
* = numi*2**32 / den + numf*2**16 /den (b16)
*/
/* Let:
*
* num = numi*2**16 + numf (b16)
* den = deni*2**16 + denf (b16)
*
* Then:
*
* num/den = numi*2**16 / den + numf / den (b0)
* = numi*2**32 / den + numf*2**16 /den (b16)
*/
/* Check for overflow in the first part of the quotient */
+1 -1
View File
@@ -121,6 +121,6 @@ int uname(FAR struct utsname *name)
name->machine[SYS_NAMELEN-1] = '\0';
return ret;
}
}
#endif /* (!CONFIG_BUILD_PROTECTED) && !CONFIG_BUILD_KERNEL) || __KERNEL__ */
+2 -2
View File
@@ -228,7 +228,7 @@ errorout_with_herrnocode:
*h_errnop = herrnocode;
}
return ERROR;
return ERROR;
}
#endif
@@ -341,7 +341,7 @@ errorout_with_herrnocode:
*h_errnop = herrnocode;
}
return ERROR;
return ERROR;
}
/****************************************************************************
+6 -6
View File
@@ -112,7 +112,7 @@ static int lib_numeric_address(FAR const char *name, FAR struct hostent *host,
* be big enough).
*/
if (buflen <= sizeof(struct hostent_info_s))
if (buflen <= sizeof(struct hostent_info_s))
{
return -ERANGE;
}
@@ -335,7 +335,7 @@ static int lib_find_answer(FAR const char *name, FAR struct hostent *host,
* be big enough).
*/
if (buflen <= sizeof(struct hostent_info_s))
if (buflen <= sizeof(struct hostent_info_s))
{
return -ERANGE;
}
@@ -360,7 +360,7 @@ static int lib_find_answer(FAR const char *name, FAR struct hostent *host,
return ret;
}
/* Get the address type; verify the address size. */
/* Get the address type; verify the address size. */
#ifdef CONFIG_NET_IPv4
#ifdef CONFIG_NET_IPv6
@@ -479,7 +479,7 @@ static int lib_dns_lookup(FAR const char *name, FAR struct hostent *host,
* be big enough).
*/
if (buflen <= sizeof(struct hostent_info_s))
if (buflen <= sizeof(struct hostent_info_s))
{
return -ERANGE;
}
@@ -676,7 +676,7 @@ errorout_with_herrnocode:
*h_errnop = herrnocode;
}
return ERROR;
return ERROR;
}
#endif /* CONFIG_NETDB_HOSTFILE */
@@ -793,7 +793,7 @@ int gethostbyname_r(FAR const char *name, FAR struct hostent *host,
*h_errnop = HOST_NOT_FOUND;
}
return ERROR;
return ERROR;
#endif
}
+1 -1
View File
@@ -279,7 +279,7 @@ ssize_t lib_parse_hostfile(FAR FILE *stream, FAR struct hostent *host,
* be big enough).
*/
if (buflen <= sizeof(struct hostent_info_s))
if (buflen <= sizeof(struct hostent_info_s))
{
return -ERANGE;
}
+1 -1
View File
@@ -118,7 +118,7 @@ void (*sigset(int signo, void (*disp)(int)))(int)
* indicate the error.
*/
if (ret == OK)
if (ret == OK)
{
return oact.sa_handler;
}
+1 -1
View File
@@ -64,7 +64,7 @@ static int stdinstream_getc(FAR struct lib_instream_s *this)
this->nget++;
}
return ret;
return ret;
}
/****************************************************************************
+1 -1
View File
@@ -64,7 +64,7 @@ static int stdsistream_getc(FAR struct lib_sistream_s *this)
this->nget++;
}
return ret;
return ret;
}
/****************************************************************************
+2 -2
View File
@@ -83,8 +83,8 @@ int settimeofday(FAR const struct timeval *tv, FAR struct timezone *tz)
/* Convert the timeval to a timespec */
ts.tv_sec = tv->tv_sec;
ts.tv_nsec = tv->tv_usec * NSEC_PER_USEC;
ts.tv_sec = tv->tv_sec;
ts.tv_nsec = tv->tv_usec * NSEC_PER_USEC;
/* Let clock_settime do the work */
+5 -5
View File
@@ -64,14 +64,14 @@
#if 0
static inline void _trimdir(char *path)
{
/* Skip any trailing '/' characters (unless it is also the leading '/') */
/* Skip any trailing '/' characters (unless it is also the leading '/') */
int len = strlen(path) - 1;
while (len > 0 && path[len] == '/')
{
int len = strlen(path) - 1;
while (len > 0 && path[len] == '/')
{
path[len] = '\0';
len--;
}
}
}
#else
# define _trimdir(p)