aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2023-12-28 14:21:13 -0500
committerTormod Volden <debian.tormod@gmail.com>2024-01-20 12:09:35 +0100
commit66e63d68eb4351c1220a11186a073491ca2c03db (patch)
treec12ef2948aba00fc43f6e5fe57aa1fe8b9d80b00
parentb4f877f6f406913dbe5ee00159b9ebfbb589de12 (diff)
downloadlibusb-66e63d68eb4351c1220a11186a073491ca2c03db.tar.gz
Correct some spelling and add codespell config file
In one case, renamed a variable from `larg` which codespell thought was a typo for `large`. Closes #1411
-rw-r--r--.codespellrc3
-rw-r--r--README.git2
-rw-r--r--libusb/libusb.h2
-rw-r--r--libusb/os/sunos_usb.c14
-rw-r--r--libusb/version_nano.h2
-rw-r--r--tests/init_context.c2
-rw-r--r--tests/macos.c2
-rw-r--r--tests/set_option.c2
-rw-r--r--tests/umockdev.c6
9 files changed, 19 insertions, 16 deletions
diff --git a/.codespellrc b/.codespellrc
new file mode 100644
index 0000000..dba3ab7
--- /dev/null
+++ b/.codespellrc
@@ -0,0 +1,3 @@
+[codespell]
+skip = strerror.c,AUTHORS
+ignore-words-list = numer,ser,xwindows
diff --git a/README.git b/README.git
index d67d374..b845138 100644
--- a/README.git
+++ b/README.git
@@ -11,7 +11,7 @@ configure with a default set of options, and will therefore generate a Makefile,
whereas the latter does not invoke configure at all. If using autogen.sh, note
that you can also append options, that will be passed as is to configure.
-OS X-specific notes:
+macOS-specific notes:
-------------------
Starting with Xcode 4.3, neither Xcode.app nor the Xcode 'command line tools'
diff --git a/libusb/libusb.h b/libusb/libusb.h
index e416f09..038e5f3 100644
--- a/libusb/libusb.h
+++ b/libusb/libusb.h
@@ -1501,7 +1501,7 @@ enum libusb_option {
#define LIBUSB_OPTION_WEAK_AUTHORITY LIBUSB_OPTION_NO_DEVICE_DISCOVERY
- /** Set the context log callback functon.
+ /** Set the context log callback function.
*
* Set the log callback function either on a context or globally. This
* option must be provided an argument of type libusb_log_cb. Using this
diff --git a/libusb/os/sunos_usb.c b/libusb/os/sunos_usb.c
index 9c08f7e..6c8250c 100644
--- a/libusb/os/sunos_usb.c
+++ b/libusb/os/sunos_usb.c
@@ -82,7 +82,7 @@ static int sunos_usb_ioctl(struct libusb_device *dev, int cmd);
static int sunos_get_link(di_devlink_t devlink, void *arg)
{
- walk_link_t *larg = (walk_link_t *)arg;
+ walk_link_t *link_arg = (walk_link_t *)arg;
const char *p;
const char *q;
@@ -112,21 +112,21 @@ static int sunos_get_link(di_devlink_t devlink, void *arg)
static int sunos_physpath_to_devlink(
const char *node_path, const char *match, char **link_path)
{
- walk_link_t larg;
+ walk_link_t link_arg;
di_devlink_handle_t hdl;
*link_path = NULL;
- larg.linkpp = link_path;
+ link_arg.linkpp = link_path;
if ((hdl = di_devlink_init(NULL, 0)) == NULL) {
usbi_dbg(NULL, "di_devlink_init failure");
return (-1);
}
- larg.len = strlen(node_path);
- larg.path = (char *)node_path;
+ link_arg.len = strlen(node_path);
+ link_arg.path = (char *)node_path;
(void) di_devlink_walk(hdl, match, NULL, DI_PRIMARY_LINK,
- (void *)&larg, sunos_get_link);
+ (void *)&link_arg, sunos_get_link);
(void) di_devlink_fini(&hdl);
@@ -624,7 +624,7 @@ sunos_add_devices(di_devlink_t link, void *arg)
}
if (usbi_sanitize_device(dev) < 0) {
libusb_unref_device(dev);
- usbi_dbg(NULL, "sanatize failed: ");
+ usbi_dbg(NULL, "sanitize failed: ");
return (DI_WALK_TERMINATE);
}
} else {
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index b4ca6bb..644de2d 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 11870
+#define LIBUSB_NANO 11871
diff --git a/tests/init_context.c b/tests/init_context.c
index 80b93fd..004848c 100644
--- a/tests/init_context.c
+++ b/tests/init_context.c
@@ -58,7 +58,7 @@ static int unsetenv(const char *env) {
} while (0)
/**
- * Use relational operatator to compare two values and fail the test if the
+ * Use relational operator to compare two values and fail the test if the
* comparison is false. Intended to compare integer or pointer types.
*
* Example: LIBUSB_EXPECT(==, 0, 1) -> fail, LIBUSB_EXPECT(==, 0, 0) -> ok.
diff --git a/tests/macos.c b/tests/macos.c
index 5a7bc20..a7b1231 100644
--- a/tests/macos.c
+++ b/tests/macos.c
@@ -51,7 +51,7 @@
} while (0)
/**
- * Use relational operatator to compare two values and fail the test if the
+ * Use relational operator to compare two values and fail the test if the
* comparison is false. Intended to compare integer or pointer types.
*
* Example: LIBUSB_EXPECT(==, 0, 1) -> fail, LIBUSB_EXPECT(==, 0, 0) -> ok.
diff --git a/tests/set_option.c b/tests/set_option.c
index defa3cf..d7786a1 100644
--- a/tests/set_option.c
+++ b/tests/set_option.c
@@ -66,7 +66,7 @@ static int setenv(const char *env, const char *value, int overwrite) {
} while (0)
/**
- * Use relational operatator to compare two values and fail the test if the
+ * Use relational operator to compare two values and fail the test if the
* comparison is false. Intended to compare integer or pointer types.
*
* Example: LIBUSB_EXPECT(==, 0, 1) -> fail, LIBUSB_EXPECT(==, 0, 0) -> ok.
diff --git a/tests/umockdev.c b/tests/umockdev.c
index ec0a07b..a2d457e 100644
--- a/tests/umockdev.c
+++ b/tests/umockdev.c
@@ -89,7 +89,7 @@ typedef struct {
GList *flying_urbs;
GList *discarded_urbs;
- /* GMutex confuses tsan unecessarily */
+ /* GMutex confuses TSan unnecessarily */
pthread_mutex_t mutex;
} UMockdevTestbedFixture;
@@ -245,7 +245,7 @@ handle_ioctl_cb (UMockdevIoctlBase *handler, UMockdevIoctlClient *client, UMockd
ioctl_arg = umockdev_ioctl_client_get_arg (client);
/* NOTE: We share the address space, dereferencing pointers *will* work.
- * However, to make tsan work, we still stick to the API that resolves
+ * However, to make TSan work, we still stick to the API that resolves
* the data into a local copy! */
switch (request) {
@@ -432,7 +432,7 @@ test_fixture_setup_libusb(UMockdevTestbedFixture * fixture, int devcount)
libusb_init_context(/*ctx=*/&fixture->ctx, /*options=*/NULL, /*num_options=*/0);
- /* Supress global log messages completely
+ /* Suppress global log messages completely
* (though, in some tests it might be interesting to check there are no real ones).
*/
libusb_set_log_cb (NULL, log_handler_null, LIBUSB_LOG_CB_GLOBAL);