mbed OS5
Fork of UIPEthernet by
Diff: UIPClient.cpp
- Revision:
- 6:10e42359e217
- Parent:
- 4:d774541a34da
- Child:
- 8:4acb22344932
--- a/UIPClient.cpp Fri Nov 27 20:34:03 2015 +0000 +++ b/UIPClient.cpp Sun Nov 29 17:54:01 2015 +0000 @@ -369,7 +369,7 @@ * @retval */ int UIPClient::read(void) { - uint8_t c; + static uint8_t c; if(read(&c, 1) < 0) return -1; return c; @@ -382,9 +382,9 @@ * @retval */ int UIPClient::peek(void) { + static uint8_t c; if(*this) { if(data->packets_in[0] != NOBLOCK) { - uint8_t c; UIPEthernet.network.readPacket(data->packets_in[0], 0, &c, 1); return c; } @@ -693,3 +693,4 @@ } } #endif +