[Pkg-shadow-commits] r2047 - in upstream/trunk: . libmisc

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Mon May 26 00:09:25 UTC 2008


Author: nekral-guest
Date: 2008-05-26 00:09:24 +0000 (Mon, 26 May 2008)
New Revision: 2047

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/libmisc/sulog.c
Log:
	* libmisc/sulog.c (sulog): The success argument is a bool.
	* libmisc/sulog.c: The return values of fflush is not checked on purpose.
	* libmisc/sulog.c: Indicate that some return values should be checked.


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2008-05-26 00:04:30 UTC (rev 2046)
+++ upstream/trunk/ChangeLog	2008-05-26 00:09:24 UTC (rev 2047)
@@ -1,5 +1,13 @@
 2008-05-26  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* libmisc/sulog.c (sulog): The success argument is a bool.
+	* libmisc/sulog.c: The return values of fflush is not checked on
+	purpose.
+	* libmisc/sulog.c: Indicate that some return values should be
+	checked.
+
+2008-05-26  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* libmisc/ttytype.c: Avoid implicit conversion of pointers /
 	integers to booleans.
 	* libmisc/ttytype.c: Avoid assignments in comparisons.

Modified: upstream/trunk/libmisc/sulog.c
===================================================================
--- upstream/trunk/libmisc/sulog.c	2008-05-26 00:04:30 UTC (rev 2046)
+++ upstream/trunk/libmisc/sulog.c	2008-05-26 00:09:24 UTC (rev 2047)
@@ -2,6 +2,7 @@
  * Copyright (c) 1989 - 1992, Julianne Frances Haugh
  * Copyright (c) 1996 - 2000, Marek Michałkiewicz
  * Copyright (c) 2001 - 2005, Tomasz Kłoczko
+ * Copyright (c) 2008       , Nicolas François
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -40,10 +41,11 @@
 #include "prototypes.h"
 #include "defines.h"
 #include "getdef.h"
+
 /*
  * sulog - log a SU command execution result
  */
-void sulog (const char *tty, int success, const char *oldname, const char *name)
+void sulog (const char *tty, bool success, const char *oldname, const char *name)
 {
 	char *sulog_file;
 	time_t now;
@@ -93,6 +95,8 @@
 		 tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min,
 		 success ? '+' : '-', tty, oldname, name);
 
-	fflush (fp);
+	(void) fflush (fp);
 	fclose (fp);
+	/* TODO: log if failure */
 }
+




More information about the Pkg-shadow-commits mailing list