Commit Graph

17 Commits

Author SHA1 Message Date
João Valverde c5a19582e4 epan: Convert to use stdio.h from GLib
Replace:
    g_snprintf() -> snprintf()
    g_vsnprintf() -> vsnprintf()
    g_strdup_printf() -> ws_strdup_printf()
    g_strdup_vprintf() -> ws_strdup_vprintf()

This is more portable, user-friendly and faster on platforms
where GLib does not like the native I/O.

Adjust the format string to use macros from intypes.h.
2021-12-19 19:29:53 +00:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
Change all wireshark.org URLs to use https.

Fix some broken links while we're at it.

Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26 18:44:40 +00:00
Guy Harris 37490e3607 Update a comment.
Change-Id: I9a1f5ed85591202c52f26d4b3d63d8beb7578e15
Reviewed-on: https://code.wireshark.org/review/26623
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-03-24 04:03:20 +00:00
Guy Harris bff1f7f70e Don't rely on "xxx *yyy[N] = {};" compiling.
At least as I read C90 "6.5.7 Initialization" and C99 "6.7.8
Initialization", there must be at least one "initializer" in an
"initializer-list", so nothing requires that the compiler accept, for
example

	static const ws_mem_usage_t *memory_components[MAX_COMPONENTS] = {
	};

Bug: 14556
Change-Id: Ief1dbfee504ad5ef1d984390dc2da18deba7fb90
Reviewed-on: https://code.wireshark.org/review/26616
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-03-24 02:33:17 +00:00
Dario Lombardo 55c68ee69c epan: use SPDX indentifiers.
Skipping dissectors dir for now.

Change-Id: I717b66bfbc7cc81b83f8c2cbc011fcad643796aa
Reviewed-on: https://code.wireshark.org/review/25694
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08 19:29:45 +00:00
Dario Lombardo 12efbd6b40 app_mem_usage: rename shadow variable
Change-Id: I0db888633118beeabfe4bb8fa6da419d0827c7c1
Reviewed-on: https://code.wireshark.org/review/16106
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-26 06:04:09 +00:00
Jeff Morriss 019522b104 Don't use the prohibited API open().
This open call is Linux-specific (so there's no harm in using open() rather
than ws_open()) but this will keep checkAPIs happy.

Change-Id: I5695c1bd3b1a4af320ef0acfa1a8162c1d9f14e1
Reviewed-on: https://code.wireshark.org/review/14879
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-04-11 23:22:29 +00:00
Bill Meier 23e78cd6bd Add editor modelines; Adjust whitespace as needed.
Change-Id: I3dc57f4c2ca57585103e3b71503ac4c332903e50
Reviewed-on: https://code.wireshark.org/review/4594
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-10 14:50:08 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Bill Meier 11b5c15fdb Remove trailing whitespace
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0
Reviewed-on: https://code.wireshark.org/review/385
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-25 20:46:49 +00:00
Jakub Zawadzki f6c55aa296 app_mem_usage fixes:
- Add missing feature test macro for pread()
- Fix $Id$ line

svn path=/trunk/; revision=51169
2013-08-06 16:38:36 +00:00
Jakub Zawadzki a9b8779fb9 Linux: add support for getting total/rss from /proc/self/statm
svn path=/trunk/; revision=51070
2013-07-31 19:02:56 +00:00
Jakub Zawadzki 1cabad610b Add some very basic framework to fetch statistics of memory usage per component.
Use it in memory_dlg.

svn path=/trunk/; revision=51069
2013-07-31 18:26:14 +00:00
Jakub Zawadzki e5997ef390 Remove dirty (and not compiling) code from app_mem_usage.c, need rewrite if really needed.
svn path=/trunk/; revision=51035
2013-07-30 19:47:51 +00:00
Evan Huus 338701e9fd Move a few variables inside the appropriate ifdefs.
svn path=/trunk/; revision=51029
2013-07-30 16:50:31 +00:00
Anders Broman d0c26ae7ca Add missing includes.
svn path=/trunk/; revision=51028
2013-07-30 16:21:15 +00:00
Anders Broman 78afe3fa82 Add a routine to get application memory usage to epan.
svn path=/trunk/; revision=51023
2013-07-30 05:49:58 +00:00