[olsr-dev] [PATCH] Improvements in dot_draw plugin

Bernd Petrovitsch (spam-protected)
Sun Nov 6 23:03:58 CET 2005

The attached patch removes lots of duplicated stuff by adding a
ipc_send_str() function.
Furtehr a few typos are corrected and a function and several variables
were made "static".
It is against 0.4.9.

The open questions are:
- Do you actually appreciate such patches?
  And in that format?
- There severe problems there also: The use of sprintf() is dangerous
  since the function doesn't know how long the buffer.
  The obvious fix is to replace it (unconditionally) with the - now
  common on glibc systems - snprintf() (which I could do). The question
  is if non-Linux-OSes have a problem with such a fix.
  I'm also not a friend of strcpy()/strcat() for the same reason.
  And BTW strncpy()/strncat() have the problem that they do not
  guarantee a terminating \0 character in the string.
- Do you want more such "cleanup" patches?
  And can they be done so that *BSD and Win* do not suffer from
  Linux-isms I'm probably introducing?

Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dot-draw.patch
Type: text/x-patch
Size: 5085 bytes
Desc: not available
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20051106/4fbcd326/attachment.bin>

More information about the Olsr-dev mailing list