[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[augeas-devel] augeas: master - * src/transform.c (store_error): ignore errors from err_set



Gitweb:        http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=7e21002350be701198c433f19b9329ce06c4b212
Commit:        7e21002350be701198c433f19b9329ce06c4b212
Parent:        75371bf116d662d869778e41ed6ed11b401b0b9a
Author:        David Lutterkort <lutter redhat com>
AuthorDate:    Fri Mar 20 14:50:27 2009 -0700
Committer:     David Lutterkort <lutter redhat com>
CommitterDate: Fri Mar 20 14:50:27 2009 -0700

* src/transform.c (store_error): ignore errors from err_set

---
 src/transform.c |   26 ++++++++------------------
 1 files changed, 8 insertions(+), 18 deletions(-)

diff --git a/src/transform.c b/src/transform.c
index 5d61ab2..b63e023 100644
--- a/src/transform.c
+++ b/src/transform.c
@@ -272,35 +272,25 @@ static int store_error(struct augeas *aug,
         if (r < 0)
             goto done;
 
+        /* Errors from err_set are ignored on purpose. We try
+         * to report as much as we can */
         if (err != NULL) {
             if (err->pos >= 0) {
                 size_t line, ofs;
-                r = err_set(aug, &ep, s_pos, "%d", err->pos);
-                if (r < 0)
-                    goto done;
+                err_set(aug, &ep, s_pos, "%d", err->pos);
                 if (text != NULL) {
                     calc_line_ofs(text, err->pos, &line, &ofs);
-                    r = err_set(aug, &ep, s_line, "%zd", line);
-                    if (r < 0)
-                        goto done;
-                    r = err_set(aug, &ep, s_char, "%zd", ofs);
-                    if (r < 0)
-                        goto done;
+                    err_set(aug, &ep, s_line, "%zd", line);
+                    err_set(aug, &ep, s_char, "%zd", ofs);
                 }
             }
             if (err->path != NULL) {
-                r = err_set(aug, &ep, s_path, "%s%s", path, err->path);
-                if (r < 0)
-                    goto done;
+                err_set(aug, &ep, s_path, "%s%s", path, err->path);
             }
-            r = err_set(aug, &ep, s_message, "%s", err->message);
-            if (r < 0)
-                goto done;
+            err_set(aug, &ep, s_message, "%s", err->message);
         } else if (errnum != 0) {
             const char *msg = strerror(errnum);
-            r = err_set(aug, &ep, s_message, "%s", msg);
-            if (r < 0)
-                goto done;
+            err_set(aug, &ep, s_message, "%s", msg);
         }
     }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]