1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00

Changing from long to ssize_t (int) for write(), print(), println() return.

This commit is contained in:
David A. Mellis
2011-08-26 14:20:41 -04:00
parent 3f0b7f21c2
commit 929597375b
23 changed files with 123 additions and 121 deletions

View File

@ -1121,7 +1121,7 @@ uint8_t SdFile::truncate(uint32_t length) {
* for a read-only file, device is full, a corrupt file system or an I/O error.
*
*/
long SdFile::write(const void* buf, uint16_t nbyte) {
ssize_t SdFile::write(const void* buf, uint16_t nbyte) {
// convert void* to uint8_t* - must be before goto statements
const uint8_t* src = reinterpret_cast<const uint8_t*>(buf);
@ -1219,7 +1219,7 @@ long SdFile::write(const void* buf, uint16_t nbyte) {
*
* Use SdFile::writeError to check for errors.
*/
long SdFile::write(uint8_t b) {
ssize_t SdFile::write(uint8_t b) {
return write(&b, 1);
}
//------------------------------------------------------------------------------
@ -1228,7 +1228,7 @@ long SdFile::write(uint8_t b) {
*
* Use SdFile::writeError to check for errors.
*/
long SdFile::write(const char* str) {
ssize_t SdFile::write(const char* str) {
return write(str, strlen(str));
}
//------------------------------------------------------------------------------