~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_dirname.cc

  • Committer: Brian Aker
  • Date: 2009-04-27 14:36:40 UTC
  • Revision ID: brian@gaz-20090427143640-f6zjmtt9vm55qgm2
Patch on show processlist from  davi@apache.org

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
   along with this program; if not, write to the Free Software
14
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
 
#include "mysys_priv.h"
 
16
#include "mysys/mysys_priv.h"
17
17
#include <mystrings/m_string.h>
18
18
 
19
19
        /* Functions definied in this file */
149
149
  }
150
150
#else
151
151
  /* This is ok even if to == from, becasue we need to cut the string */
152
 
  to= strmake(to, from, (size_t) (from_end-from));
 
152
  size_t len= cmin(strlen(from),(size_t)(from_end-from));
 
153
  assert(memmove(to, from, len));
 
154
  to+= len;
 
155
  to[0]= '\0';
153
156
#endif
154
157
 
155
158
  /* Add FN_LIBCHAR to the end of directory path */