~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_dirname.cc

  • Committer: Monty Taylor
  • Date: 2008-12-02 08:56:16 UTC
  • mfrom: (629.5.6 remove-strmake)
  • mto: This revision was merged to the branch mainline in revision 637.
  • Revision ID: mordred@solanthus.local-20081202085616-k1dvv8fly0jt70ho
MergedĀ fromĀ Toru.

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
  to= strncpy(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 */