From c62b1c7be957398d6641b00f2282fb7235091a3c Mon Sep 17 00:00:00 2001
From: Andre Noll <maan@tuebingen.mpg.de>
Date: Sat, 8 Jul 2017 22:55:11 +0200
Subject: [PATCH] Let error codes start out at index 1.

When the error code facility was simplified one year ago in commit
a775408 (Simplify the error subsystem, get rid of error2.[ch]) we
introduced a simple enum for all error codes, but missed the fact
that this approach assigns the first error code the value zero.

Hence, when the AAC decoder returns this error code, it will not be
recognized as an error because we generally check for negative return
values only.

This patch introduces an unused dummy error code so that the real
error codes start at index 1.
---
 error.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/error.h b/error.h
index 899c574b..97d67817 100644
--- a/error.h
+++ b/error.h
@@ -8,6 +8,7 @@
 
 /** Codes and messages. */
 #define PARA_ERRORS \
+	PARA_ERROR(SUCCESS, "success"), \
 	PARA_ERROR(AAC_AFH_INIT, "failed to init aac decoder"), \
 	PARA_ERROR(AACDEC_INIT, "failed to init aac decoder"), \
 	PARA_ERROR(AAC_DECODE, "aac decode error"), \
-- 
2.39.5