From: Davin McCall Date: Sun, 5 Jun 2016 17:28:36 +0000 (+0100) Subject: Fix style inconsistency in CPBuffer: fillTo -> fill_to X-Git-Tag: v0.01~12 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=10bb455b3835924965cdbaab67fc7f38979dde4e;p=oweals%2Fdinit.git Fix style inconsistency in CPBuffer: fillTo -> fill_to There is generally inconsistent style throughout the codebase, but at least this one class can be self-consistent... --- diff --git a/src/cpbuffer.h b/src/cpbuffer.h index 3907fd0..9787204 100644 --- a/src/cpbuffer.h +++ b/src/cpbuffer.h @@ -55,9 +55,9 @@ template class CPBuffer return r; } - // fill by readin from the given fd, until at least the specified number of bytes are in + // fill by reading from the given fd, until at least the specified number of bytes are in // the buffer. Return 0 if end-of-file reached before fill complete, or -1 on error. - int fillTo(int fd, int rlength) noexcept + int fill_to(int fd, int rlength) noexcept { while (length < rlength) { int r = fill(fd); diff --git a/src/dinitctl.cc b/src/dinitctl.cc index 1e5c2fe..7218ec7 100644 --- a/src/dinitctl.cc +++ b/src/dinitctl.cc @@ -32,7 +32,7 @@ class ReadCPException static void fillBufferTo(CPBuffer<1024> *buf, int fd, int rlength) { - int r = buf->fillTo(fd, rlength); + int r = buf->fill_to(fd, rlength); if (r == -1) { throw ReadCPException(errno); } @@ -352,7 +352,7 @@ int main(int argc, char **argv) } // Wait until service started: - r = rbuffer.fillTo(socknum, 2); + r = rbuffer.fill_to(socknum, 2); while (r > 0) { if (rbuffer[0] >= 100) { int pktlen = (unsigned char) rbuffer[1]; @@ -385,7 +385,7 @@ int main(int argc, char **argv) } rbuffer.consume(pktlen); - r = rbuffer.fillTo(socknum, 2); + r = rbuffer.fill_to(socknum, 2); } else { // Not an information packet?