MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rioRead

Function rioRead

app/redis-6.2.6/src/rio.h:119–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119static inline size_t rioRead(rio *r, void *buf, size_t len) {
120 if (r->flags & RIO_FLAG_READ_ERROR) return 0;
121 while (len) {
122 size_t bytes_to_read = (r->max_processing_chunk && r->max_processing_chunk < len) ? r->max_processing_chunk : len;
123 if (r->read(r,buf,bytes_to_read) == 0) {
124 r->flags |= RIO_FLAG_READ_ERROR;
125 return 0;
126 }
127 if (r->update_cksum) r->update_cksum(r,buf,bytes_to_read);
128 buf = (char*)buf + bytes_to_read;
129 len -= bytes_to_read;
130 r->processed_bytes += bytes_to_read;
131 }
132 return 1;
133}
134
135static inline off_t rioTell(rio *r) {
136 return r->tell(r);

Callers 14

readSyncBulkPayloadFunction · 0.85
rdbLoadTypeFunction · 0.85
rdbLoadTimeFunction · 0.85
rdbLoadMillisecondTimeFunction · 0.85
rdbLoadLenByRefFunction · 0.85
rdbLoadIntegerObjectFunction · 0.85
rdbLoadLzfStringObjectFunction · 0.85
rdbLoadDoubleValueFunction · 0.85
rdbLoadBinaryDoubleValueFunction · 0.85
rdbLoadBinaryFloatValueFunction · 0.85
rdbLoadObjectFunction · 0.85

Calls 1

readMethod · 0.45

Tested by

no test coverage detected