[xiph-cvs] cvs commit: vorbis-tools/vorbiscomment vcedit.c

Michael Smith msmith at xiph.org
Thu Sep 12 05:41:53 PDT 2002



msmith      02/09/12 08:41:53

  Modified:    vorbiscomment vcedit.c
  Log:
  Error messages weren't reported correctly. Fix.

Revision  Changes    Path
1.21      +4 -3      vorbis-tools/vorbiscomment/vcedit.c

Index: vcedit.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/vorbiscomment/vcedit.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- vcedit.c	9 Jul 2002 12:44:54 -0000	1.20
+++ vcedit.c	12 Sep 2002 12:41:52 -0000	1.21
@@ -6,7 +6,7 @@
  *
  * Comment editing backend, suitable for use by nice frontend interfaces.
  *
- * last modified: $Id: vcedit.c,v 1.20 2002/07/09 12:44:54 msmith Exp $
+ * last modified: $Id: vcedit.c,v 1.21 2002/09/12 12:41:52 msmith Exp $
  */
 
 #include <stdio.h>
@@ -42,6 +42,7 @@
 
 static void vcedit_clear_internals(vcedit_state *state)
 {
+    char *tmp;
         if(state->vc)
         {
                 vorbis_comment_clear(state->vc);
@@ -68,7 +69,9 @@
         free(state->vi);
     }
 
+    tmp = state->lasterror;
     memset(state, 0, sizeof(*state));
+    state->lasterror = tmp;
 }
 
 void vcedit_clear(vcedit_state *state)
@@ -452,12 +455,10 @@
                                  * write the page out now */
                                 if(state->write(ogout.header,1,ogout.header_len, 
                                                 out) != (size_t) ogout.header_len) {
-                    fprintf(stderr, "Bumming out\n");
                                         goto cleanup;
                 }
                                 if(state->write(ogout.body,1,ogout.body_len, out) !=
                                                 (size_t) ogout.body_len) {
-                    fprintf(stderr, "Bumming out 2\n");
                                         goto cleanup;
                 }
                         }

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list