Mesa (master): mesa: Change save_attrib_data() to return boolean

Brian Paul brianp at kemper.freedesktop.org
Wed Dec 18 16:17:40 UTC 2013


Module: Mesa
Branch: master
Commit: d08ac826c517f2a0a96c5e00d5c9bc4c223e6564
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d08ac826c517f2a0a96c5e00d5c9bc4c223e6564

Author: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
Date:   Mon Dec 16 07:04:00 2013 -0700

mesa: Change save_attrib_data() to return boolean

Change save_attrib_data() to return true/false depending on success.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/mesa/main/attrib.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 8a2a268..3ecf533 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -182,7 +182,7 @@ struct texture_state
  * Allocate new attribute node of given type/kind.  Attach payload data.
  * Insert it into the linked list named by 'head'.
  */
-static void
+static bool
 save_attrib_data(struct gl_attrib_node **head,
                  GLbitfield kind, void *payload)
 {
@@ -196,7 +196,9 @@ save_attrib_data(struct gl_attrib_node **head,
    }
    else {
       /* out of memory! */
+      return false;
    }
+   return true;
 }
 
 




More information about the mesa-commit mailing list