Revision: 47121
          http://brlcad.svn.sourceforge.net/brlcad/?rev=47121&view=rev
Author:   brlcad
Date:     2011-10-05 23:25:49 +0000 (Wed, 05 Oct 2011)
Log Message:
-----------
simplify, just call bu_strdup() like bu_dirname() does

Modified Paths:
--------------
    brlcad/trunk/src/libbu/basename.c

Modified: brlcad/trunk/src/libbu/basename.c
===================================================================
--- brlcad/trunk/src/libbu/basename.c   2011-10-05 22:38:49 UTC (rev 47120)
+++ brlcad/trunk/src/libbu/basename.c   2011-10-05 23:25:49 UTC (rev 47121)
@@ -33,10 +33,7 @@
     size_t len;
 
     if (UNLIKELY(!str)) {
-       base_str = bu_malloc(2, "bu_basename empty");;
-       base_str[0] = '.';
-       base_str[1] = '\0';
-       return base_str;
+       return bu_strdup(".");
     }
 
     /* skip the filesystem disk/drive name if we're on a DOS-capable

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to