Skip to content

Commit

Permalink
Only one buffer.c, please.
Browse files Browse the repository at this point in the history
Otherwise, if you link with both libwiretap and libfiletap, it's
anybody's guess which one you get.  That means you're wasting memory
with two copies of its routines if they're identical, and means
surprising behavior if they're not (which showed up when I was debugging
a double-free crash - fixing libwiretap's buffer_free() didn't fix the
problem, because Wireshark happened to be calling libfiletap' unfixed
buffer_free()).

There's nothing *tap-specific about Buffers, anyway, so it really
belongs in wsutil.

Change-Id: I91537e46917e91277981f8f3365a2c0873152870
Reviewed-on: https://code.wireshark.org/review/3066
Reviewed-by: Guy Harris <[email protected]>
  • Loading branch information
guyharris committed Jul 15, 2014
1 parent 61ac815 commit d4dab16
Show file tree
Hide file tree
Showing 65 changed files with 58 additions and 295 deletions.
1 change: 0 additions & 1 deletion filetap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
include(UseABICheck)

set(CLEAN_FILES
buffer.c
file_access.c
ft_file_wrappers.c
ftap.c
Expand Down
2 changes: 0 additions & 2 deletions filetap/Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@
# generated from YACC or Lex files (as Automake doesn't want them in
# _SOURCES variables).
NONGENERATED_C_FILES = \
buffer.c \
file_access.c \
ft_file_wrappers.c \
ftap.c

# Header files that are not generated from other files
NONGENERATED_HEADER_FILES = \
buffer.h \
ft_file_wrappers.h \
ftap.h \
ftap-int.h
2 changes: 1 addition & 1 deletion filetap/file_access.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

#include "ftap-int.h"
#include "ft_file_wrappers.h"
#include "buffer.h"
#include <wsutil/buffer.h>

/*
* Add an extension, and all compressed versions thereof, to a GSList
Expand Down
2 changes: 1 addition & 1 deletion filetap/ftap.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

#include "ft_file_wrappers.h"
#include <wsutil/file_util.h>
#include "buffer.h"
#include <wsutil/buffer.h>

#ifdef HAVE_PLUGINS

Expand Down
2 changes: 1 addition & 1 deletion filetap/ftap.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#include <glib.h>
#include <time.h>
#include <filetap/buffer.h>
#include <wsutil/buffer.h>
#include <wsutil/nstime.h>
#include "ws_symbol_export.h"

Expand Down
2 changes: 1 addition & 1 deletion wiretap/5views.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include "wtap-int.h"
#include "file_wrappers.h"
#include "buffer.h"
#include <wsutil/buffer.h>
#include "5views.h"


Expand Down
1 change: 0 additions & 1 deletion wiretap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ set(CLEAN_FILES
atm.c
ber.c
btsnoop.c
buffer.c
camins.c
catapult_dct2000.c
commview.c
Expand Down
2 changes: 0 additions & 2 deletions wiretap/Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ NONGENERATED_C_FILES = \
atm.c \
ber.c \
btsnoop.c \
buffer.c \
camins.c \
catapult_dct2000.c \
commview.c \
Expand Down Expand Up @@ -90,7 +89,6 @@ NONGENERATED_HEADER_FILES = \
ascend-int.h \
atm.h \
ber.h \
buffer.h \
btsnoop.h \
camins.h \
catapult_dct2000.h \
Expand Down
2 changes: 1 addition & 1 deletion wiretap/aethra.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <string.h>
#include "wtap-int.h"
#include "file_wrappers.h"
#include "buffer.h"
#include <wsutil/buffer.h>
#include "aethra.h"

/* Magic number in Aethra PC108 files. */
Expand Down
2 changes: 1 addition & 1 deletion wiretap/ascend.y
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ XMIT-Max7:20: (task "_brouterControlTask" at 0xb094ac20, time: 1481.51) 20 octet
#include <string.h>

#include "wtap-int.h"
#include "buffer.h"
#include <wsutil/buffer.h>
#include "ascendtext.h"
#include "ascend-int.h"
#include "file_wrappers.h"
Expand Down
2 changes: 1 addition & 1 deletion wiretap/ascendtext.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "config.h"
#include "wtap-int.h"
#include "buffer.h"
#include <wsutil/buffer.h>
#include "ascendtext.h"
#include "ascend-int.h"
#include "file_wrappers.h"
Expand Down
2 changes: 1 addition & 1 deletion wiretap/ber.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#include "wtap-int.h"
#include "file_wrappers.h"
#include "buffer.h"
#include <wsutil/buffer.h>
#include "ber.h"


Expand Down
2 changes: 1 addition & 1 deletion wiretap/btsnoop.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <string.h>
#include "wtap-int.h"
#include "file_wrappers.h"
#include "buffer.h"
#include <wsutil/buffer.h>
#include "atm.h"
#include "btsnoop.h"

Expand Down
162 changes: 0 additions & 162 deletions wiretap/buffer.c

This file was deleted.

72 changes: 0 additions & 72 deletions wiretap/buffer.h

This file was deleted.

2 changes: 1 addition & 1 deletion wiretap/camins.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
#include <wtap.h>
#include <wtap-int.h>
#include <file_wrappers.h>
#include <buffer.h>
#include <wsutil/buffer.h>

#include "camins.h"

Expand Down
2 changes: 1 addition & 1 deletion wiretap/catapult_dct2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include "wtap-int.h"
#include "file_wrappers.h"
#include "buffer.h"
#include <wsutil/buffer.h>

#include "catapult_dct2000.h"

Expand Down
2 changes: 1 addition & 1 deletion wiretap/commview.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

#include "wtap.h"
#include "wtap-int.h"
#include "buffer.h"
#include <wsutil/buffer.h>
#include "file_wrappers.h"
#include "commview.h"

Expand Down
2 changes: 1 addition & 1 deletion wiretap/cosine.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include "config.h"
#include "wtap-int.h"
#include "buffer.h"
#include <wsutil/buffer.h>
#include "cosine.h"
#include "file_wrappers.h"

Expand Down
Loading

0 comments on commit d4dab16

Please sign in to comment.