write: Kill E_WRITE_SYNTAX.
authorAndre Noll <maan@systemlinux.org>
Sat, 6 Aug 2011 20:11:57 +0000 (22:11 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 13 Aug 2011 11:00:33 +0000 (13:00 +0200)
This value was used but no code path existed that would actually
return this error, so remove it.

error.h
write.c

diff --git a/error.h b/error.h
index b8078770e5368c3840e0c6c91e3ff6267a7f7590..1e4bf044fe98d49490604b352517afbcba6f2ab8 100644 (file)
--- a/error.h
+++ b/error.h
@@ -34,6 +34,7 @@ DEFINE_ERRLIST_OBJECT_ENUM;
 #define STDOUT_ERRORS
 #define FILE_WRITE_ERRORS
 #define STDIN_ERRORS
+#define WRITE_ERRORS
 
 extern const char **para_errlist[];
 
@@ -422,10 +423,6 @@ extern const char **para_errlist[];
        PARA_ERROR(READ_PATTERN, "did not read expected pattern"), \
 
 
-#define WRITE_ERRORS \
-       PARA_ERROR(WRITE_SYNTAX, "para_write syntax error"), \
-
-
 #define ALSA_WRITE_ERRORS \
        PARA_ERROR(BROKEN_CONF, "Broken alsa configuration"), \
        PARA_ERROR(ACCESS_TYPE, "alsa access type not available"), \
diff --git a/write.c b/write.c
index 3d1b093264bf3e88602b4dc146929582c5b896ed..fcb477f80a1d2bcaf94d0f4b1b220164fb8d67c5 100644 (file)
--- a/write.c
+++ b/write.c
@@ -224,7 +224,6 @@ static int setup_and_schedule(void)
        cwt->task.error = 0;
        register_task(&cwt->task);
 
-       ret = -E_WRITE_SYNTAX;
        if (!conf.writer_given) {
                i = 0;
                wns = para_calloc(sizeof(*wns));
@@ -287,7 +286,7 @@ out:
  */
 int main(int argc, char *argv[])
 {
-       int ret = -E_WRITE_SYNTAX;
+       int ret;
 
        writer_init();
        write_cmdline_parser(argc, argv, &conf);