diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-03-28 16:06:56 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-03-28 16:06:56 +0000 |
commit | 6a79e47a66fcc0d38cffca54b862a1efa19eb822 (patch) | |
tree | d57d866e590029f590543adf137fffaeb234ab84 /nuttx/graphics/nxconsole | |
parent | 6402e6269bd2f9619b7a7b21bab9a1fedc6f360b (diff) | |
download | px4-nuttx-6a79e47a66fcc0d38cffca54b862a1efa19eb822.tar.gz px4-nuttx-6a79e47a66fcc0d38cffca54b862a1efa19eb822.tar.bz2 px4-nuttx-6a79e47a66fcc0d38cffca54b862a1efa19eb822.zip |
NX console updates
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4534 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/graphics/nxconsole')
-rwxr-xr-x | nuttx/graphics/nxconsole/nxcon_driver.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nuttx/graphics/nxconsole/nxcon_driver.c b/nuttx/graphics/nxconsole/nxcon_driver.c index dc7d5f353..d4ab71464 100755 --- a/nuttx/graphics/nxconsole/nxcon_driver.c +++ b/nuttx/graphics/nxconsole/nxcon_driver.c @@ -124,6 +124,7 @@ static ssize_t nxcon_write(FAR struct file *filep, FAR const char *buffer, size_t buflen) { FAR struct nxcon_state_s *priv; + ssize_t remaining; char ch; int lineheight; int ret; @@ -145,7 +146,7 @@ static ssize_t nxcon_write(FAR struct file *filep, FAR const char *buffer, lineheight = (priv->fheight + CONFIG_NXCONSOLE_LINESEPARATION); - while (buflen-- > 0) + for (remaining = (ssize_t)buflen; remaining > 0; remaining--) { /* Ignore carriage returns */ @@ -195,7 +196,7 @@ static ssize_t nxcon_write(FAR struct file *filep, FAR const char *buffer, } sem_post(&priv->exclsem); - return buflen; + return (ssize_t)buflen; } /**************************************************************************** |