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
This commit is contained in:
Sean McBride 2023-12-28 14:21:13 -05:00 committed by Tormod Volden
parent b4f877f6f4
commit 66e63d68eb
9 changed files with 19 additions and 16 deletions

3
.codespellrc Normal file
View file

@ -0,0 +1,3 @@
[codespell]
skip = strerror.c,AUTHORS
ignore-words-list = numer,ser,xwindows

View file

@ -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'

View file

@ -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

View file

@ -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 {

View file

@ -1 +1 @@
#define LIBUSB_NANO 11870
#define LIBUSB_NANO 11871

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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);