Typos. A bunch of typos I've been collecting.
[vpp.git] / src / vlib / unix / cli.c
index 42c1374..f9d6b40 100644 (file)
@@ -581,7 +581,7 @@ unix_cli_del_pending_output (clib_file_t * uf,
  * @param str The buffer in which to search for the value.
  * @param len The depth into the buffer to search.
  *
- * @return The index of the first occurence of \c chr. If \c chr is not
+ * @return The index of the first occurrence of \c chr. If \c chr is not
  *          found then \c len instead.
  */
 always_inline word
@@ -899,7 +899,7 @@ unix_cli_pager_redraw (unix_cli_file_t * cf, clib_file_t * uf)
  *
  * If instead @c line is @c NULL then @c len_or_index is taken to mean the
  * index of an existing line in the pager buffer; this simply means that the
- * input line does not need to be cloned since we alreayd have it. This is
+ * input line does not need to be cloned since we already have it. This is
  * typical if we are reindexing the pager buffer.
  *
  * @param cf           The CLI session whose pager we are adding to.
@@ -2728,7 +2728,7 @@ unix_cli_file_add (unix_cli_main_t * cm, char *name, int fd)
     }
 
   pool_get (cm->cli_file_pool, cf);
-  memset (cf, 0, sizeof (*cf));
+  clib_memset (cf, 0, sizeof (*cf));
 
   template.read_function = unix_cli_read_ready;
   template.write_function = unix_cli_write_ready;
@@ -2772,8 +2772,8 @@ unix_cli_listen_read_ready (clib_file_t * uf)
 
   /* Disable Nagle, ignore any errors doing so eg on PF_LOCAL socket */
   one = 1;
-  setsockopt (client.fd, IPPROTO_TCP, TCP_NODELAY,
-             (void *) &one, sizeof (one));
+  (void) setsockopt (client.fd, IPPROTO_TCP, TCP_NODELAY,
+                    (void *) &one, sizeof (one));
 
   client_name = (char *) format (0, "%U%c", format_sockaddr, &client.peer, 0);
 
@@ -2918,7 +2918,7 @@ unix_cli_config (vlib_main_t * vm, unformat_input_t * input)
       if (isatty (STDIN_FILENO) && um->cli_line_mode == 0)
        {
          /* Capture terminal resize events */
-         memset (&sa, 0, sizeof (sa));
+         clib_memset (&sa, 0, sizeof (sa));
          sa.sa_handler = unix_cli_resize_interrupt;
          if (sigaction (SIGWINCH, &sa, 0) < 0)
            clib_panic ("sigaction");