summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukáš Hrázký <lhrazky@redhat.com>2018-06-11 18:39:50 +0200
committerLukáš Hrázký <lhrazky@redhat.com>2018-06-25 13:00:50 +0200
commit91330cfc62864b830aab00f6e74aa3988be986d8 (patch)
treec40bd2dbf80d14e5b7faf7b8f490c5cfac7b9e30
parent992744bc3594994b628ee1c9e7a8e19af4fa52e4 (diff)
Remove the logmask variable
The variable is unnecessary, we can pass the value straight to setlogmask(). Signed-off-by: Lukáš Hrázký <lhrazky@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-rw-r--r--src/spice-streaming-agent.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
index 49466f9..67679ac 100644
--- a/src/spice-streaming-agent.cpp
+++ b/src/spice-streaming-agent.cpp
@@ -416,7 +416,6 @@ int main(int argc, char* argv[])
const char *stream_port_name = "/dev/virtio-ports/org.spice-space.stream.0";
int opt;
const char *log_filename = NULL;
- int logmask = LOG_UPTO(LOG_WARNING);
const char *pluginsdir = PLUGINSDIR;
enum {
OPT_first = UCHAR_MAX,
@@ -436,7 +435,7 @@ int main(int argc, char* argv[])
openlog("spice-streaming-agent",
isatty(fileno(stderr)) ? (LOG_PERROR|LOG_PID) : LOG_PID, LOG_USER);
- setlogmask(logmask);
+ setlogmask(LOG_UPTO(LOG_WARNING));
while ((opt = getopt_long(argc, argv, "hp:c:l:d", long_options, NULL)) != -1) {
switch (opt) {
@@ -475,8 +474,7 @@ int main(int argc, char* argv[])
log_filename = optarg;
break;
case 'd':
- logmask = LOG_UPTO(LOG_DEBUG);
- setlogmask(logmask);
+ setlogmask(LOG_UPTO(LOG_DEBUG));
break;
case 'h':
usage(argv[0]);