nit: typo-fix in comment (my goof)
[exim.git] / src / src / exim.c
index 5a1437c3bfa8b71b80a07dc77461d8737d8d44bb..c12b95477f797214523ed727dedf54c523157401 100644 (file)
@@ -2,7 +2,7 @@
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) University of Cambridge 1995 - 2016 */
+/* Copyright (c) University of Cambridge 1995 - 2017 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 
@@ -3196,10 +3196,10 @@ for (i = 1; i < argc; i++)
     which sets the host protocol and host name */
 
     if (*argrest == 0)
-      {
-      if (i+1 < argc) argrest = argv[++i]; else
+      if (i+1 < argc)
+       argrest = argv[++i];
+      else
         { badarg = TRUE; break; }
-      }
 
     if (*argrest != 0)
       {
@@ -3213,9 +3213,7 @@ for (i = 1; i < argc; i++)
 
       hn = Ustrchr(argrest, ':');
       if (hn == NULL)
-        {
         received_protocol = argrest;
-        }
       else
         {
        int old_pool = store_pool;
@@ -3878,7 +3876,7 @@ else
   }
 
 /* At this point, we know if the user is privileged and some command-line
-options become possibly imperssible, depending upon the configuration file. */
+options become possibly impermissible, depending upon the configuration file. */
 
 if (checking && commandline_checks_require_admin && !admin_user) {
   fprintf(stderr, "exim: those command-line flags are set to require admin\n");
@@ -5828,50 +5826,5 @@ exim_exit(EXIT_SUCCESS, US"main");   /* Never returns */
 return 0;                  /* To stop compiler warning */
 }
 
-/*************************************************
-*          read as much as requested             *
-*************************************************/
-
-/* The syscall read(2) doesn't always returns as much as we want. For
-several reasons it might get less. (Not talking about signals, as syscalls
-are restartable). When reading from a network or pipe connection the sender
-might send in smaller chunks, with delays between these chunks. The read(2)
-may return such a chunk.
-
-The more the writer writes and the smaller the pipe between write and read is,
-the more we get the chance of reading leass than requested. (See bug 2130)
-
-This function read(2)s until we got all the data we *requested*.
-
-Note: This function may block. Use it only if you're sure about the
-amount of data you will get.
-
-Argument:
-  fd          the file descriptor to read from
-  buffer      pointer to a buffer of size len
-  len         the requested(!) amount of bytes
-
-Returns:      the amount of bytes read
-*/
-ssize_t
-readn(int fd, void *buffer, size_t len)
-{
-  void *next = buffer;
-  void *end = buffer + len;
-
-  while (next < end)
-    {
-    ssize_t got = read(fd, next, end - next);
-
-    /* I'm not sure if there are signals that can interrupt us,
-    for now I assume the worst */
-    if (got == -1 && errno == EINTR) continue;
-    if (got <= 0) return next - buffer;
-    next += got;
-    }
-
-  return len;
-}
-
 
 /* End of exim.c */