Consistently include <config.h> in all C source files and never in header files.
[platform/upstream/dbus.git] / dbus / dbus-md5.c
index 9f025c5..af71d5c 100644 (file)
@@ -1,4 +1,4 @@
-/* -*- mode: C; c-file-style: "gnu" -*- */
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
 /* dbus-md5.c md5 implementation (based on L Peter Deutsch implementation)
  *
  * Copyright (C) 2003 Red Hat Inc.
@@ -34,6 +34,7 @@
  * <ghost@aladdin.com>.
  */
 
+#include <config.h>
 #include "dbus-internals.h"
 #include "dbus-md5.h"
 #include <string.h>
@@ -54,7 +55,7 @@
  * The implementation of MD5 (see http://www.ietf.org/rfc/rfc1321.txt).
  * This MD5 implementation was written by L. Peter Deutsch and
  * is not derived from the RSA reference implementation in the
- * RFC. The version included in D-BUS comes from the Ghostscript
+ * RFC. The version included in D-Bus comes from the Ghostscript
  * 7.05 distribution.
  *
  * @{
@@ -157,7 +158,7 @@ main(int argc, char **argv)
 #define T62 /* 0xbd3af235 */ (T_MASK ^ 0x42c50dca)
 #define T63    0x2ad7d2bb
 #define T64 /* 0xeb86d391 */ (T_MASK ^ 0x14792c6e)
-#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS */
 
 static void
 md5_process(DBusMD5Context *context, const unsigned char *data /*[64]*/)
@@ -451,7 +452,7 @@ _dbus_md5_final (DBusMD5Context   *context,
   /* some kind of security paranoia, though it seems pointless
    * to me given the nonzeroed stuff flying around
    */
-  memset ((void*)context, '\0', sizeof (DBusMD5Context));
+  _DBUS_ZERO(*context);
 
   return TRUE;
 }