Ticket #8 (closed defect: fixed)

Opened 14 months ago

Last modified 7 months ago

Fix strcmp()

Reported by: sam Owned by: sam
Priority: minor Milestone: NxOS 0.2
Component: baseplate Version:
Keywords: Cc:

Description

For now, the simple strcmp() function doesn't work properly with empty strings. Because it calls strncmp() with the smallest string length, the string comparison is always true whereas it shouldn't.

Change History

Changed 14 months ago by sam

  • milestone set to NxOS 0.2

Changed 14 months ago by sam

  • owner changed from somebody to sam
  • status changed from new to assigned

Changed 14 months ago by dave

  • component changed from component1 to baseplate

Changed 7 months ago by dave

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in 2d1a26628a09. The solution has been to replace strcmp() and strncmp() with streq() and strneq(). We do not actually need total order comparison, just equality comparison. This gave the chance to reimplement it and thoroughly test it.

Note: See TracTickets for help on using tickets.