diff mbox series

[libmnl] doc: fix some non-native English usages

Message ID 20221223215621.2940577-1-jeremy@azazel.net
State Changes Requested
Delegated to: Pablo Neira
Headers show
Series [libmnl] doc: fix some non-native English usages | expand

Commit Message

Jeremy Sowden Dec. 23, 2022, 9:56 p.m. UTC
"allows to" -> "allows ${pronoun} to".  We use "you" if that appears in context,
"one" otherwise.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
---
 src/attr.c   | 14 +++++++-------
 src/nlmsg.c  |  6 +++---
 src/socket.c |  2 +-
 3 files changed, 11 insertions(+), 11 deletions(-)

Comments

Pablo Neira Ayuso Dec. 24, 2022, 5:16 p.m. UTC | #1
On Fri, Dec 23, 2022 at 09:56:21PM +0000, Jeremy Sowden wrote:
> "allows to" -> "allows ${pronoun} to".  We use "you" if that appears in context,
> "one" otherwise.

$ patch -p1 < libmnl-doc-fix-some-non-native-English-usages.patch
patching file src/attr.c
Hunk #1 FAILED at 115.
Hunk #2 FAILED at 222.
Hunk #3 succeeded at 262 (offset 18 lines).
Hunk #4 succeeded at 289 (offset 18 lines).
2 out of 4 hunks FAILED -- saving rejects to file src/attr.c.rej
patching file src/nlmsg.c
Hunk #1 succeeded at 518 (offset 30 lines).
patching file src/socket.c
Jeremy Sowden Dec. 24, 2022, 5:24 p.m. UTC | #2
On 2022-12-24, at 18:16:55 +0100, Pablo Neira Ayuso wrote:
> On Fri, Dec 23, 2022 at 09:56:21PM +0000, Jeremy Sowden wrote:
> > "allows to" -> "allows ${pronoun} to".  We use "you" if that appears in context,
> > "one" otherwise.
> 
> $ patch -p1 < libmnl-doc-fix-some-non-native-English-usages.patch
> patching file src/attr.c
> Hunk #1 FAILED at 115.
> Hunk #2 FAILED at 222.
> Hunk #3 succeeded at 262 (offset 18 lines).
> Hunk #4 succeeded at 289 (offset 18 lines).
> 2 out of 4 hunks FAILED -- saving rejects to file src/attr.c.rej
> patching file src/nlmsg.c
> Hunk #1 succeeded at 518 (offset 30 lines).
> patching file src/socket.c

Whoops.  Will rebase.

J.
diff mbox series

Patch

diff --git a/src/attr.c b/src/attr.c
index 838eab063981..2b1261d63a86 100644
--- a/src/attr.c
+++ b/src/attr.c
@@ -115,7 +115,7 @@  EXPORT_SYMBOL struct nlattr *mnl_attr_next(const struct nlattr *attr)
  * \param attr pointer to attribute to be checked
  * \param max maximum attribute type
  *
- * This function allows to check if the attribute type is higher than the
+ * This function allows one to check if the attribute type is higher than the
  * maximum supported type. If the attribute type is invalid, this function
  * returns -1 and errno is explicitly set. On success, this function returns 1.
  *
@@ -222,8 +222,8 @@  EXPORT_SYMBOL int mnl_attr_validate(const struct nlattr *attr, enum mnl_attr_dat
  * \param type attribute type (see enum mnl_attr_data_type)
  * \param exp_len expected attribute data size
  *
- * This function allows to perform a more accurate validation for attributes
- * whose size is variable. If the size of the attribute is not what we expect,
+ * This function allows one to perform a more accurate validation for attributes
+ * whose size is variable. If the size of the attribute is not what is expected,
  * this functions returns -1 and errno is explicitly set.
  */
 EXPORT_SYMBOL int mnl_attr_validate2(const struct nlattr *attr,
@@ -244,8 +244,8 @@  EXPORT_SYMBOL int mnl_attr_validate2(const struct nlattr *attr,
  * \param cb callback function that is called for each attribute
  * \param data pointer to data that is passed to the callback function
  *
- * This function allows to iterate over the sequence of attributes that compose
- * the Netlink message. You can then put the attribute in an array as it
+ * This function allows you to iterate over the sequence of attributes that
+ * compose the Netlink message. You can then put the attribute in an array as it
  * usually happens at this stage or you can use any other data structure (such
  * as lists or trees).
  *
@@ -271,8 +271,8 @@  EXPORT_SYMBOL int mnl_attr_parse(const struct nlmsghdr *nlh,
  * \param cb callback function that is called for each attribute in the nest
  * \param data pointer to data passed to the callback function
  *
- * This function allows to iterate over the sequence of attributes that compose
- * the Netlink message. You can then put the attribute in an array as it
+ * This function allows you to iterate over the sequence of attributes that
+ * compose the Netlink message. You can then put the attribute in an array as it
  * usually happens at this stage or you can use any other data structure (such
  * as lists or trees).
  *
diff --git a/src/nlmsg.c b/src/nlmsg.c
index ce37cbc63191..a42c2050471f 100644
--- a/src/nlmsg.c
+++ b/src/nlmsg.c
@@ -488,9 +488,9 @@  EXPORT_SYMBOL bool mnl_nlmsg_batch_next(struct mnl_nlmsg_batch *b)
  * mnl_nlmsg_batch_reset - reset the batch
  * \param b pointer to batch
  *
- * This function allows to reset a batch, so you can reuse it to create a
- * new one. This function moves the last message which does not fit the
- * batch to the head of the buffer, if any.
+ * This function allows you to reset a batch, so you can reuse it to create a
+ * new one. This function moves the last message which does not fit the batch to
+ * the head of the buffer, if any.
  */
 EXPORT_SYMBOL void mnl_nlmsg_batch_reset(struct mnl_nlmsg_batch *b)
 {
diff --git a/src/socket.c b/src/socket.c
index dbfb06c4f895..85b6bcc8048c 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -135,7 +135,7 @@  EXPORT_SYMBOL struct mnl_socket *mnl_socket_open(int bus)
  * \param bus the netlink socket bus ID (see NETLINK_* constants)
  * \param flags the netlink socket flags (see SOCK_* constants in socket(2))
  *
- * This is similar to mnl_socket_open(), but allows to set flags like
+ * This is similar to mnl_socket_open(), but allows one to set flags like
  * SOCK_CLOEXEC at socket creation time (useful for multi-threaded programs
  * performing exec calls).
  *