diff options
author | Guy Harris <guy@alum.mit.edu> | 2019-02-01 11:24:16 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2019-02-01 20:35:05 +0000 |
commit | b3bb4aa8f4ee948041442f2e35fb0a4aa3d28667 (patch) | |
tree | 80330ba41e64f61a529dc23f0506c72091c93e82 /wsutil/win32-utils.h | |
parent | 961d8bfc5d37edf5f3361f4cf0f4e251175de1fc (diff) |
Have win32strerror() return interned strings.
That's what g_strerror() does, and it means that the caller doesn't need
to free the string (it's kept around, and if another call to
win32strerror() generates the same string, the interned string is
returned).
Change-Id: I564bb700fabe2629131fb1c6468494dd5f5fc9e3
Reviewed-on: https://code.wireshark.org/review/31854
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wsutil/win32-utils.h')
-rw-r--r-- | wsutil/win32-utils.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wsutil/win32-utils.h b/wsutil/win32-utils.h index 13d06c591c..7f7e401d38 100644 --- a/wsutil/win32-utils.h +++ b/wsutil/win32-utils.h @@ -55,7 +55,7 @@ gchar * protect_arg (const gchar *argv); * it must be freed with g_free(). */ WS_DLL_PUBLIC -char * win32strerror(DWORD error); +const char * win32strerror(DWORD error); /** Generate a string for a Win32 exception code. * |