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

gEDA-cvs: pcb.git: branch: master updated (d4008636d791302464c176b8127a8a5e66a954ec)



The branch, master has been updated
       via  d4008636d791302464c176b8127a8a5e66a954ec (commit)
      from  8ce572e8c1cfded6459e43d61c776df859e11f55 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 src/hid/gtk/gtkhid-gl.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)


=================
 Commit Messages
=================

commit d4008636d791302464c176b8127a8a5e66a954ec
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    gtk/gl: Don't set "magenta" for a NULL color passed to ghid_set_color
    
    The code has a strdup (name), followed by a test for name == NULL. If
    name _were_ ever NULL, the strdup would crash, so we can remove this
    test.

:100644 100644 8af8a03... 71889d8... M	src/hid/gtk/gtkhid-gl.c

=========
 Changes
=========

commit d4008636d791302464c176b8127a8a5e66a954ec
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    gtk/gl: Don't set "magenta" for a NULL color passed to ghid_set_color
    
    The code has a strdup (name), followed by a test for name == NULL. If
    name _were_ ever NULL, the strdup would crash, so we can remove this
    test.

diff --git a/src/hid/gtk/gtkhid-gl.c b/src/hid/gtk/gtkhid-gl.c
index 8af8a03..71889d8 100644
--- a/src/hid/gtk/gtkhid-gl.c
+++ b/src/hid/gtk/gtkhid-gl.c
@@ -368,14 +368,6 @@ ghid_set_color (hidGC gc, const char *name)
     }
 
   old_name = strdup (name);
-
-  if (name == NULL)
-    {
-      fprintf (stderr, "%s():  name = NULL, setting to magenta\n",
-               __FUNCTION__);
-      name = "magenta";
-    }
-
   gc->colorname = (char *) name;
 
   if (gport->colormap == NULL)




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs