~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_dirname.cc

  • Committer: Toru Maesaka
  • Date: 2008-12-17 07:16:37 UTC
  • mto: (685.1.40 devel) (713.1.5 devel)
  • mto: This revision was merged to the branch mainline in revision 713.
  • Revision ID: dev@torum.net-20081217071637-7j9040w7lpms77r2
Removed my_time() and added error checking

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 */