* Hacked by Peter Breitenlohner, peb@mppmu.mpg.de,
* to remove trailing empty fields. Oct 5, 96.
*
- * 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@misiek.eu.org>
+ * 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL>
* - added Native Language Support
*
*
#include "my_crypt.h"
#include "islocal.h"
#include "setpwnam.h"
+#include "xstrncpy.h"
#include "nls.h"
#include "env.h"
info_given = false;
while (true) {
c = getopt_long (argc, argv, "f:r:p:h:o:uv", long_options, &index);
- if (c == EOF) break;
+ if (c == -1) break;
/* version? output version and exit. */
if (c == 'v') {
printf ("%s\n", util_linux_version);
info_given = true;
status = 0;
- strncpy (buf, whoami, sizeof(buf)-128);
- buf[sizeof(buf)-128-1] = 0;
+ xstrncpy (buf, whoami, sizeof(buf)-128);
strcat (buf, ": ");
/* now store the argument */