[Git][NTPsec/ntpsec][master] Spelling, typos in comments, error messages and variable names
James Browning
gitlab at mg.gitlab.com
Mon Feb 25 00:58:36 UTC 2019
James Browning pushed to branch master at NTPsec / ntpsec
Commits:
9398801a by Matt Selsky at 2019-02-25T00:48:51Z
Spelling, typos in comments, error messages and variable names
- - - - -
18 changed files:
- include/parse.h
- include/recvbuff.h
- include/trimble.h
- libntp/isc_interfaceiter.c
- libntp/ntp_calendar.c
- libntp/pymodule.c
- libparse/clk_rawdcf.c
- ntpd/ntp_config.c
- ntpd/ntp_leapsec.c
- ntpd/ntp_leapsec.h
- ntpd/ntp_refclock.c
- ntpd/ntp_scanner.c
- ntpd/ntp_util.c
- ntpd/nts_client.c
- ntpd/nts_server.c
- ntpd/refclock_gpsd.c
- ntpd/refclock_oncore.c
- ntpd/refclock_truetime.c
Changes:
=====================================
include/parse.h
=====================================
@@ -189,7 +189,7 @@ struct parse /* parse module local data */
unsigned long parse_lstate; /* last state code */
char *parse_ldata; /* last data buffer */
unsigned short parse_ldsize; /* last data buffer length */
- unsigned long parse_badformat; /* number of unparsable pakets */
+ unsigned long parse_badformat; /* number of unparsable packets */
timestamp_t parse_lastchar; /* last time a character was received */
parsetime_t parse_dtime; /* external data prototype */
=====================================
include/recvbuff.h
=====================================
@@ -25,7 +25,7 @@
* The maximum length NTP packet contains the NTP header, one Autokey
* request, one Autokey response, the MAC, and extension fields
* (Autokey has been removed from NTPsec, but we need to deal with
- * the largest packets from legacy versions). The only free prameter
+ * the largest packets from legacy versions). The only free parameter
* here is the maximum length of extension data.
*/
#define RX_BUFF_SIZE (LEN_PKT_NOMAC + MAX_MAC_LEN + MAX_EXT_LEN)
=====================================
include/trimble.h
=====================================
@@ -52,7 +52,7 @@
#define CMD_CHEIGHTFILT 0x73 /* height filter control */
#define CMD_CHIGH8CNT 0x75 /* high-8 (best 4) / high-6 (overdetermined) control */
#define CMD_CMAXDGPSCOR 0x77 /* maximum rate of DGPS corrections */
-#define CMD_CSUPER 0x8E /* super paket */
+#define CMD_CSUPER 0x8E /* super packet */
#define CMD_RDATAA 0x3D /* data channel A configuration:trimble_channelA:RO */
#define CMD_RALMANAC 0x40 /* almanac data for sat:gps_almanac:RO */
@@ -91,7 +91,7 @@
#define CMD_RDOUBLEXYZ 0x83 /* double precision XYZ:gps_position_ext(XYZ):RO|DEF */
#define CMD_RDOUBLELLA 0x84 /* double precision LLA:gps_position_ext(LLA):RO|DEF */
#define CMD_RDGPSSTAT 0x85 /* differential correction status:trimble_dgpsstatus:RO */
-#define CMD_RSUPER 0x8F /* super paket::0 */
+#define CMD_RSUPER 0x8F /* super packet::0 */
typedef struct cmd_info
{
=====================================
libntp/isc_interfaceiter.c
=====================================
@@ -236,7 +236,7 @@ isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp) {
isc_interfaceiter_t *iter;
isc_result_t result;
char strbuf[BUFSIZ];
- int trys, ret = 0;
+ int tries, ret = 0;
REQUIRE(mctx != NULL);
REQUIRE(iterp != NULL);
@@ -270,7 +270,7 @@ isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp) {
#endif
/* If interrupted, try again */
- for (trys = 0; trys < 3; trys++) {
+ for (tries = 0; tries < 3; tries++) {
if ((ret = getifaddrs(&iter->ifaddrs)) >= 0)
break;
if (errno != EINTR)
@@ -812,10 +812,10 @@ isc_ioctl(int fildes, int req, char *arg);
static int
isc_ioctl(int fildes, int req, char *arg) {
- int trys;
+ int tries;
int ret;
- for (trys = 0; trys < 3; trys++) {
+ for (tries = 0; tries < 3; tries++) {
if ((ret = ioctl(fildes, req, arg)) < 0) {
if (errno == EINTR)
continue;
=====================================
libntp/ntp_calendar.c
=====================================
@@ -252,7 +252,7 @@ ntpcal_periodic_extend(
* Convert a timestamp in NTP scale to a 64bit seconds value in the UN*X
* scale with proper epoch unfolding around a given pivot or the current
* system time. This function happily accepts negative pivot values as
- * timestamps befor 1970-01-01, so be aware of possible trouble on
+ * timestamps before 1970-01-01, so be aware of possible trouble on
* platforms with 32bit 'time_t'!
*
* This is also a periodic extension, but since the cycle is 2^32 and
=====================================
libntp/pymodule.c
=====================================
@@ -133,7 +133,7 @@ ntpc_step_systime(PyObject *self, PyObject *args)
/*
* What we really want is for Python to parse a long double.
* As this is, it's a potential source of problems in the Python
- * utilties if and when the time difference between the Unix epoch
+ * utilities if and when the time difference between the Unix epoch
* and now exceeds the range of a double.
*/
if (!PyArg_ParseTuple(args, "d", &adjustment))
=====================================
libparse/clk_rawdcf.c
=====================================
@@ -613,7 +613,7 @@ inp_rawdcf(
* Sun kernel driver, and this could always be called
* from userspace. Problem discovered while eliminating
* the timestamp_t union; this was one of only two
- * referebces to the timrspec member. It is unknown
+ * references to the timespec member. It is unknown
* whether this change actually corrects the code.
*/
if (lfpuint(t->timeout) != 0)
=====================================
ntpd/ntp_config.c
=====================================
@@ -1319,7 +1319,7 @@ config_monitor(
/* NOTE:
* Calling filegen_get is brain dead. Doing a string
- * comparison to find the relavant filegen structure is
+ * comparison to find the relevant filegen structure is
* expensive.
*
* Through the parser, we already know which filegen is
=====================================
ntpd/ntp_leapsec.c
=====================================
@@ -840,7 +840,7 @@ leapsec_raw(
return false;
}
#endif
- /* Start 28 days earler. Avoids month arithmetic. */
+ /* Start 28 days earlier. Avoids month arithmetic. */
starttime = ttime - 28*SECSPERDAY;
li.ttime = ttime;
li.stime = ttime - starttime;
=====================================
ntpd/ntp_leapsec.h
=====================================
@@ -219,7 +219,7 @@ extern bool leapsec_add_dyn(bool insert, time_t ntp_now);
extern bool leapsec_query(leap_result_t *qr, time_t when);
/* Get the current leap frame info. Returns true if the result contains
- * useable data, false if there is currently no leap second frame.
+ * usable data, false if there is currently no leap second frame.
* This merely replicates some results from a previous query, but since
* it does not check the current time, only the following entries are
* meaningful:
=====================================
ntpd/ntp_refclock.c
=====================================
@@ -606,7 +606,7 @@ refclock_gtlin(
* canonical or raw modes. The terminal interface routines map CR to LF.
* In canonical mode this results in two lines, one containing data
* followed by LF and another containing only LF. In raw mode the
- * interface routines can deliver arbitraty chunks of data from one
+ * interface routines can deliver arbitrary chunks of data from one
* character to a maximum specified by the calling routine. In either
* mode the routine returns the number of characters in the line
* followed by a NULL character ('\0'), which is not included in the
=====================================
ntpd/ntp_scanner.c
=====================================
@@ -103,7 +103,7 @@ keyword(
* 'ntpq'.
*
* Now there are a few functions to maintain a stack of nested input
- * sources (though nesting is only allowd for disk files) and from the
+ * sources (though nesting is only allowed for disk files) and from the
* scanner / parser point of view there's no difference between both
* types of sources.
*
=====================================
ntpd/ntp_util.c
=====================================
@@ -188,7 +188,7 @@ write_stats(void)
* reduce the wander_resid by half each hour. When
* the difference between the prev_drift_comp and
* drift_comp is less than the wander_resid, update
- * the frequncy file. This minimizes the file writes to
+ * the frequency file. This minimizes the file writes to
* nonvolaile storage.
*/
DPRINT(1, ("write_stats: frequency %.6lf thresh %.6lf, freq %.6lf\n",
=====================================
ntpd/nts_client.c
=====================================
@@ -258,7 +258,7 @@ bool nts_make_keys(SSL *ssl, uint8_t *c2s, uint8_t *s2c, int keylen) {
bool nts_client_build_request(struct peer* peer, SSL *ssl) {
uint8_t buff[1000];
- int used, transfered;
+ int used, transferred;
struct BufCtl_t buf;
UNUSED_ARG(peer);
@@ -282,9 +282,9 @@ bool nts_client_build_request(struct peer* peer, SSL *ssl) {
used, (long)sizeof(buff));
return false;
}
- transfered = SSL_write(ssl, buff, used);
- if (used != transfered) {
- msyslog(LOG_ERR, "NTSc: write failed: %d, %d, %m", used, transfered);
+ transferred = SSL_write(ssl, buff, used);
+ if (used != transferred) {
+ msyslog(LOG_ERR, "NTSc: write failed: %d, %d, %m", used, transferred);
return false;
}
return true;
@@ -292,15 +292,15 @@ bool nts_client_build_request(struct peer* peer, SSL *ssl) {
bool nts_client_process_response(struct peer* peer, SSL *ssl) {
uint8_t buff[2000];
- int transfered, idx;
+ int transferred, idx;
struct BufCtl_t buf;
- transfered = SSL_read(ssl, buff, sizeof(buff));
- if (0 > transfered) {
- msyslog(LOG_ERR, "NTSc: read failed: %d, %m", transfered);
+ transferred = SSL_read(ssl, buff, sizeof(buff));
+ if (0 > transferred) {
+ msyslog(LOG_ERR, "NTSc: read failed: %d, %m", transferred);
return false;
}
- msyslog(LOG_ERR, "NTSc: read %d bytes", transfered);
+ msyslog(LOG_ERR, "NTSc: read %d bytes", transferred);
peer->nts_state.aead = -1;
peer->nts_state.keylen = 0;
@@ -309,7 +309,7 @@ bool nts_client_process_response(struct peer* peer, SSL *ssl) {
peer->nts_state.count = 0;
buf.next = buff;
- buf.left = transfered;
+ buf.left = transferred;
while (buf.left > 0) {
uint16_t type, data;
bool critical = false;
=====================================
ntpd/nts_server.c
=====================================
@@ -341,7 +341,7 @@ int nts_translate_version(const char *arg) {
return -1;
#endif
}
- msyslog(LOG_ERR, "NTS: unreconized version string: %s.", arg);
+ msyslog(LOG_ERR, "NTS: unrecognized version string: %s.", arg);
return -1;
}
=====================================
ntpd/refclock_gpsd.c
=====================================
@@ -1467,7 +1467,7 @@ process_version(
/* request watch for our GPS device if not yet watched.
*
* The version string is also sent as a life signal, if we have
- * seen useable data. So if we're already watching the device,
+ * seen usable data. So if we're already watching the device,
* skip the request.
*
* Reuse the input buffer, which is no longer needed in the
=====================================
ntpd/refclock_oncore.c
=====================================
@@ -1734,7 +1734,7 @@ oncore_get_timestamp(
/* or current and mine */
current_params.mode |= instance->pps_p.mode;
- /* but only set whats legal */
+ /* but only set what's legal */
current_params.mode &= current_mode;
current_params.assert_offset.tv_sec = 0;
@@ -3223,7 +3223,7 @@ oncore_msg_Gj(
instance->saw_Gj = 1; /* flag, saw_Gj, don't need to try Bj in check_leap */
- /* print the message to verify whats there */
+ /* print the message to verify what's there */
dt = buf[5] - buf[4];
=====================================
ntpd/refclock_truetime.c
=====================================
@@ -436,7 +436,7 @@ true_receive(
/*
* The clock will blurt a timecode every second but we only
- * want one when polled. If we havn't been polled, bail out.
+ * want one when polled. If we haven't been polled, bail out.
*/
if (!up->polled)
return;
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/9398801a553a2244721676d3e70b055fef6d4f51
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/9398801a553a2244721676d3e70b055fef6d4f51
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20190225/1fc20563/attachment-0001.html>
More information about the vc
mailing list