lib: Fix CID 1306765 Unchecked return value from library
[samba.git] / lib / util / time_basic.h
index b04dead10099dcbb84fc45d9b529d30981cf6ec4..d48539979787a4756480822651a65af58aefa550 100644 (file)
@@ -21,6 +21,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#ifndef _SAMBA_TIME_BASIC_H_
+#define _SAMBA_TIME_BASIC_H_
+
 #include "replace.h"
 #include "system/time.h"
 
@@ -35,8 +38,13 @@ struct timeval_buf { char buf[128]; };
  Put a date and time into dst->buf, return it dst->buf
  (optionally with microseconds)
 
+ If rfc5424 is true then produce the RFC5424 timestamp format (which
+ is a stricter instance of RFC3339 and is used for syslog). For
+ example: 2003-08-24T05:14:15.000003-07:00.  Otherwise,
  format is %Y/%m/%d %H:%M:%S
 **/
 
-char *timeval_str_buf(const struct timeval *tp, bool hires,
+char *timeval_str_buf(const struct timeval *tp, bool rfc5424, bool hires,
                      struct timeval_buf *dst);
+
+#endif /* _SAMBA_TIME_BASIC_H_ */