[haiku-bugs] Re: [Haiku] #8481: strncpy doesn't pad the destination string with NULs

  • From: "hamish" <trac@xxxxxxxxxxxx>
  • Date: Thu, 19 Apr 2012 21:48:03 -0000

#8481: strncpy doesn't pad the destination string with NULs
---------------------------------+----------------------------
   Reporter:  hamish             |      Owner:  axeld
       Type:  bug                |     Status:  new
   Priority:  normal             |  Milestone:  R1
  Component:  System/libroot.so  |    Version:  R1/Development
 Resolution:                     |   Keywords:  strncpy
 Blocked By:                     |   Blocking:
Has a Patch:  1                  |   Platform:  All
---------------------------------+----------------------------

Comment (by hamish):

 Replying to [comment:5 korli]:
 > What about this?

 Performs about the same as the loop in comment 4.

 Checking four bytes at a time beats the others by a long shot at `-O0`,
 but only seems a little faster, if at all, at `-O3`.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/8481#comment:7>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: