diff options
author | Thomas Haller <thaller@redhat.com> | 2013-10-31 14:13:33 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2013-11-13 15:29:24 +0100 |
commit | 97935382f4aca80b8f952ea9fe3ce205253758b7 (patch) | |
tree | d1dbfe40b5e93ef2c60649956519fe763004c530 /src/nm-dbus-manager.c | |
parent | ab92a0d69c6f75eb8137674a00cd9735556b06ad (diff) | |
download | NetworkManager-97935382f4aca80b8f952ea9fe3ce205253758b7.tar.gz |
coverity: fix various warnings detected with Coverity
These are (most likely) only warnings and not severe bugs.
Some of these changes are mostly made to get a clean run of
Coverity without any warnings.
Error found by running Coverity scan
https://bugzilla.redhat.com/show_bug.cgi?id=1025894
Co-Authored-By: Jiří Klimeš <jklimes@redhat.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'src/nm-dbus-manager.c')
-rw-r--r-- | src/nm-dbus-manager.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nm-dbus-manager.c b/src/nm-dbus-manager.c index e9d5fce5c1..b1aa61be6d 100644 --- a/src/nm-dbus-manager.c +++ b/src/nm-dbus-manager.c @@ -23,6 +23,7 @@ #include <unistd.h> #include <sys/stat.h> #include <sys/types.h> +#include <errno.h> #include "NetworkManager.h" #include "nm-dbus-manager.h" @@ -476,7 +477,8 @@ nm_dbus_manager_init (NMDBusManager *self) #if HAVE_DBUS_GLIB_100 /* Set up our main private DBus socket */ - mkdir (NMRUNDIR, 0700); + if (mkdir (NMRUNDIR, 0700) == -1) + nm_log_warn (LOGD_CORE, "Error creating directory \"%s\": %d (%s)", NMRUNDIR, errno, g_strerror (errno)); priv->priv_server = private_server_new (PRIV_SOCK_PATH, PRIV_SOCK_TAG, self); if (priv->priv_server) { priv->private_servers = g_slist_append (priv->private_servers, priv->priv_server); |