[Crash-utility] [PATCH 1/2] Optimize mkstring()

Petr Tesarik ptesarik at suse.cz
Wed Feb 2 10:42:19 UTC 2011


A few simple changes here:

- call memset() instead of repeatedly calling strcat() on the
  target string
- use shift_string_right() for CENTER (same is already used for
  right RJUST)
- use memset() in shift_string_right()
- remove the (no longer needed) local buffer, which makes it
  possible to call mkstring() on an arbitrarily long string

Signed-off-by: Petr Tesarik <ptesarik at suse.cz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mkstring-optimize.patch
Type: text/x-patch
Size: 1860 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20110202/e441def7/attachment.bin>


More information about the Crash-utility mailing list