patch-src_log_c 1.2 KB

123456789101112131415161718192021222324252627282930
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- iptraf-3.0.0.orig/src/log.c 2005-09-13 08:42:54.000000000 +0200
  3. +++ iptraf-3.0.0/src/log.c 2009-05-21 23:02:34.000000000 +0200
  4. @@ -125,7 +125,7 @@ void opentlog(FILE ** fd, char *logfilen
  5. void genatime(time_t now, char *atime)
  6. {
  7. - bzero(atime, TIME_TARGET_MAX);
  8. + memset(atime, 0, TIME_TARGET_MAX);
  9. strncpy(atime, ctime(&now), 26);
  10. atime[strlen(atime) - 1] = '\0';
  11. }
  12. @@ -204,7 +204,7 @@ void writeothplog(int logging, FILE * fd
  13. char scratchpad[MSGSTRING_MAX];
  14. if (logging) {
  15. - bzero(msgbuffer, MSGSTRING_MAX);
  16. + memset(msgbuffer, 0, MSGSTRING_MAX);
  17. strcpy(msgbuffer, protname);
  18. strcat(msgbuffer, "; ");
  19. @@ -491,8 +491,6 @@ void writeethlog(struct ethtabent *list,
  20. ptmp->un.desc.ascaddr);
  21. else if (ptmp->un.desc.linktype == LINK_PLIP)
  22. fprintf(fd, "\nPLIP address: %s", ptmp->un.desc.ascaddr);
  23. - else if (ptmp->un.desc.linktype == LINK_FDDI)
  24. - fprintf(fd, "\nFDDI address: %s", ptmp->un.desc.ascaddr);
  25. if (ptmp->un.desc.withdesc)
  26. fprintf(fd, " (%s)", ptmp->un.desc.desc);