Browse Source

libdpkg: Add new DPKG_ERROR_INIT macro

Guillem Jover 14 years ago
parent
commit
3313e8ba2b
1 changed files with 3 additions and 1 deletions
  1. 3 1
      lib/dpkg/error.h

+ 3 - 1
lib/dpkg/error.h

@@ -2,7 +2,7 @@
  * libdpkg - Debian packaging suite library routines
  * error.h - error message reporting
  *
- * Copyright © 2011 Guillem Jover <guillem@debian.org>
+ * Copyright © 2011-2012 Guillem Jover <guillem@debian.org>
  *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -35,6 +35,8 @@ struct dpkg_error {
 	char *str;
 };
 
+#define DPKG_ERROR_INIT { DPKG_MSG_NONE, NULL }
+
 int dpkg_put_warn(struct dpkg_error *err, const char *fmt, ...)
 	DPKG_ATTR_PRINTF(2);
 int dpkg_put_error(struct dpkg_error *err, const char *fmt, ...)