summaryrefslogtreecommitdiff
path: root/epan/filesystem.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-08-12 09:18:54 +0000
committerGuy Harris <guy@alum.mit.edu>2013-08-12 09:18:54 +0000
commit9ff00164a83e3287fc2258a6a0a85a34c4f68e27 (patch)
treea8a8f090d75cd1eb5ca033c86509958c96280a89 /epan/filesystem.c
parent70523b5014574f15b4edbd78243b6004525f3839 (diff)
downloadwireshark-9ff00164a83e3287fc2258a6a0a85a34c4f68e27.tar.gz
Fix a comment.
Fix calls checking the Linux version number. svn path=/trunk/; revision=51310
Diffstat (limited to 'epan/filesystem.c')
-rw-r--r--epan/filesystem.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/epan/filesystem.c b/epan/filesystem.c
index f93ff240b6..3351ceb4a2 100644
--- a/epan/filesystem.c
+++ b/epan/filesystem.c
@@ -324,17 +324,17 @@ static gboolean running_in_build_directory_flag = FALSE;
* that doesn't match the executable path.
*
* Sadly, not all UN*Xes necessarily have dladdr(), and those that
- * do don't necessarily have dladdr(NULL) return information about
+ * do don't necessarily have dladdr(main) return information about
* the executable image, and those that do aren't necessarily running
* on a platform wherein the executable image can get its own path
* from the kernel (either by a call or by it being handed to it along
* with argv[] and the environment), and those that can don't
- * necessarily use that to supply the path you get from dladdr(NULL),
- * so we try this first and, if that fails, use dladdr(NULL) if
+ * necessarily use that to supply the path you get from dladdr(main),
+ * so we try this first and, if that fails, use dladdr(main) if
* available.
*
* This is not guaranteed to return a non-null value; if it returns null,
- * our caller must use some other mechanism, such as dladdr(NULL) or
+ * our caller must use some other mechanism, such as dladdr(main) or
* looking at argv[0].
*
* This is not guaranteed to return an absolute path; if it doesn't,
@@ -372,8 +372,10 @@ get_executable_path(void)
return NULL;
if (strncmp(name.release, "1.", 2) == 0)
return NULL; /* Linux 1.x */
- if (strcmp(name, "2.0") == 0 || strncmp(name, "2.0.", 4) == 0 ||
- strcmp(name, "2.1") == 0 || strncmp(name, "2.1.", 4) == 0)
+ if (strcmp(name.release, "2.0") == 0 ||
+ strncmp(name.release, "2.0.", 4) == 0 ||
+ strcmp(name.release, "2.1") == 0 ||
+ strncmp(name.release, "2.1.", 4) == 0)
return NULL; /* Linux 2.0.x or 2.1.x */
if (readlink("/proc/self/exe", executable_path, sizeof executable_path) == -1)
return NULL;