aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dumpcap.c6
-rw-r--r--randpkt.c3
2 files changed, 6 insertions, 3 deletions
diff --git a/dumpcap.c b/dumpcap.c
index a359667e93..3cfeeab994 100644
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -1693,7 +1693,9 @@ capture_loop_open_output(capture_options *capture_opts, int *save_file_fd,
char tmpname[128+1];
gchar *capfile_name;
gboolean is_tempfile;
-
+#ifndef _WIN32
+ int ret;
+#endif
g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_DEBUG, "capture_loop_open_output: %s",
(capture_opts->save_file) ? capture_opts->save_file : "");
@@ -1775,7 +1777,7 @@ capture_loop_open_output(capture_options *capture_opts, int *save_file_fd,
/* capture_opts.save_file is "g_free"ed later, which is equivalent to
"g_free(capfile_name)". */
#ifndef _WIN32
- fchown(*save_file_fd, capture_opts->owner, capture_opts->group);
+ ret = fchown(*save_file_fd, capture_opts->owner, capture_opts->group);
#endif
return TRUE;
diff --git a/randpkt.c b/randpkt.c
index ab88c2c907..c8545fd870 100644
--- a/randpkt.c
+++ b/randpkt.c
@@ -615,6 +615,7 @@ seed(void)
#if defined(linux)
/* Okay, I should use #ifdef HAVE_DEV_RANDOM, but this is a quick hack */
int fd;
+ int ret;
fd = open("/dev/random", O_RDONLY);
if (fd < 0) {
@@ -622,7 +623,7 @@ seed(void)
exit(0);
}
- read(fd, &randomness, sizeof(randomness));
+ ret = read(fd, &randomness, sizeof(randomness));
#else
time_t now;