mesa: Change save_attrib_data() to return boolean
authorJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Mon, 16 Dec 2013 14:04:00 +0000 (07:04 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 18 Dec 2013 16:06:52 +0000 (09:06 -0700)
Change save_attrib_data() to return true/false depending on success.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/attrib.c

index 8a2a268b4dcbdcefd7eb907e89ed43c9eebf2a86..3ecf5339437fb8b88a41210d830b5b46504826bf 100644 (file)
@@ -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;
 }