]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - posix/getopt.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / posix / getopt.c
index 537c97741fb37aefc29b19d227ea873b56e399b0..d6459a6f56955b72b21150f2455747d462c7d17d 100644 (file)
@@ -2,8 +2,7 @@
    NOTE: getopt is part of the C library, so if you don't know what
    "Keep this file name-space clean" means, talk to drepper@gnu.org
    before changing it!
-   Copyright (C) 1987-1996,1998-2004,2008,2009,2010,2011
-   Free Software Foundation, Inc.
+   Copyright (C) 1987-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -228,7 +227,7 @@ exchange (char **argv, struct _getopt_data *d)
        {
          /* Bottom segment is the short one.  */
          int len = middle - bottom;
-         register int i;
+         int i;
 
          /* Swap it with the top part of the top segment.  */
          for (i = 0; i < len; i++)
@@ -245,7 +244,7 @@ exchange (char **argv, struct _getopt_data *d)
        {
          /* Top segment is the short one.  */
          int len = top - middle;
-         register int i;
+         int i;
 
          /* Swap it with the bottom part of the bottom segment.  */
          for (i = 0; i < len; i++)
@@ -586,7 +585,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
              char *buf = NULL;
              size_t buflen = 0;
 
-             FILE *fp = open_memstream (&buf, &buflen);
+             FILE *fp = __open_memstream (&buf, &buflen);
              if (fp != NULL)
                {
                  fprintf (fp,
@@ -602,7 +601,7 @@ _getopt_internal_r (int argc, char *const *argv, const char *optstring,
 
                  fputc_unlocked ('\n', fp);
 
-                 if (__builtin_expect (fclose (fp) != EOF, 1))
+                 if (__glibc_likely (fclose (fp) != EOF))
                    {
                      _IO_flockfile (stderr);