[Pkg-shadow-commits] r2776 - in upstream/trunk: . libmisc
Nicolas FRANÇOIS
nekral-guest at alioth.debian.org
Thu Apr 23 17:34:46 UTC 2009
Author: nekral-guest
Date: 2009-04-23 17:34:46 +0000 (Thu, 23 Apr 2009)
New Revision: 2776
Modified:
upstream/trunk/ChangeLog
upstream/trunk/libmisc/loginprompt.c
Log:
* libmisc/loginprompt.c: Use exit(EXIT_FAILURE) instead of
exit(1).
* libmisc/loginprompt.c: Avoid implicit conversion of pointers to
booleans.
* libmisc/loginprompt.c: Ignore return value of putc().
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2009-04-23 17:33:21 UTC (rev 2775)
+++ upstream/trunk/ChangeLog 2009-04-23 17:34:46 UTC (rev 2776)
@@ -1,5 +1,13 @@
2009-04-22 Nicolas François <nicolas.francois at centraliens.net>
+ * libmisc/loginprompt.c: Use exit(EXIT_FAILURE) instead of
+ exit(1).
+ * libmisc/loginprompt.c: Avoid implicit conversion of pointers to
+ booleans.
+ * libmisc/loginprompt.c: Ignore return value of putc().
+
+2009-04-22 Nicolas François <nicolas.francois at centraliens.net>
+
* libmisc/env.c, libmisc/age.c: Added splint annotations.
* libmisc/age.c: Added brackets and parenthesis.
* libmisc/age.c: Ignore the return value of fclose (file opened
Modified: upstream/trunk/libmisc/loginprompt.c
===================================================================
--- upstream/trunk/libmisc/loginprompt.c 2009-04-23 17:33:21 UTC (rev 2775)
+++ upstream/trunk/libmisc/loginprompt.c 2009-04-23 17:34:46 UTC (rev 2776)
@@ -2,7 +2,7 @@
* Copyright (c) 1989 - 1993, Julianne Frances Haugh
* Copyright (c) 1996 - 2000, Marek Michałkiewicz
* Copyright (c) 2003 - 2005, Tomasz Kłoczko
- * Copyright (c) 2008 , Nicolas François
+ * Copyright (c) 2008 - 2009, Nicolas François
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -43,7 +43,7 @@
static void login_exit (unused int sig)
{
- exit (1);
+ exit (EXIT_FAILURE);
}
/*
@@ -86,13 +86,13 @@
* be displayed and display it before the prompt.
*/
- if (prompt) {
+ if (NULL != prompt) {
cp = getdef_str ("ISSUE_FILE");
if (NULL != cp) {
fp = fopen (cp, "r");
if (NULL != fp) {
while ((i = getc (fp)) != EOF) {
- putc (i, stdout);
+ (void) putc (i, stdout);
}
(void) fclose (fp);
@@ -110,12 +110,12 @@
memzero (buf, sizeof buf);
if (fgets (buf, (int) sizeof buf, stdin) != buf) {
- exit (1);
+ exit (EXIT_FAILURE);
}
cp = strchr (buf, '\n');
if (NULL == cp) {
- exit (1);
+ exit (EXIT_FAILURE);
}
*cp = '\0'; /* remove \n [ must be there ] */
More information about the Pkg-shadow-commits
mailing list