summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/app_sock.c8
-rw-r--r--src/key.c3
-rwxr-xr-xsrc/launch.c5
-rwxr-xr-xsrc/simple_util.c3
4 files changed, 7 insertions, 12 deletions
diff --git a/src/app_sock.c b/src/app_sock.c
index fb712618..84b6f4f9 100755
--- a/src/app_sock.c
+++ b/src/app_sock.c
@@ -146,7 +146,6 @@ int __create_server_sock(int pid)
int __create_server_sock_by_path(char *path)
{
struct sockaddr_un saddr;
- struct sockaddr_un p_saddr;
int fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
/* support above version 2.6.27*/
if (fd < 0) {
@@ -200,7 +199,7 @@ int __create_agent_client_sock(int uid)
int retry = 1;
int ret = -1;
- fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
+ fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
/* support above version 2.6.27*/
if (fd < 0) {
if (errno == EINVAL) {
@@ -246,7 +245,7 @@ int __create_client_sock(int pid)
int retry = 1;
int ret = -1;
- fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
+ fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
/* support above version 2.6.27*/
if (fd < 0) {
if (errno == EINVAL) {
@@ -301,7 +300,7 @@ static int __connect_client_sock(int fd, const struct sockaddr *saptr, socklen_t
error = 0;
if ((ret = connect(fd, (struct sockaddr *)saptr, salen)) < 0) {
if (errno != EAGAIN && errno != EINPROGRESS) {
- fcntl(fd, F_SETFL, flags);
+ fcntl(fd, F_SETFL, flags);
return (-2);
}
}
@@ -676,7 +675,6 @@ int __app_send_raw_with_delay_reply(int pid, int cmd, unsigned char *kb_data, in
int fd;
int len;
int ret;
- int res = 0;
app_pkt_t *pkt = NULL;
if (kb_data == NULL || datalen > AUL_SOCK_MAXBUFF - 8) {
diff --git a/src/key.c b/src/key.c
index a94f03c1..70ac9f8b 100644
--- a/src/key.c
+++ b/src/key.c
@@ -23,9 +23,6 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#ifdef X11
-#include <utilX.h>
-#endif
#include <glib.h>
#include <poll.h>
#include <bundle.h>
diff --git a/src/launch.c b/src/launch.c
index b3c7bb36..1e7a9251 100755
--- a/src/launch.c
+++ b/src/launch.c
@@ -22,6 +22,7 @@
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/time.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
@@ -373,7 +374,7 @@ static int __send_result_to_launchpad(int fd, int res)
}
/**
- * @brief caller & callee's sock handler
+ * @brief caller & callee's sock handler
*/
int aul_sock_handler(int fd)
{
@@ -484,7 +485,7 @@ int aul_make_bundle_from_argv(int argc, char **argv, bundle **kb)
_E("Malloc failed");
return AUL_R_ERROR;
}
-
+
bundle_add(*kb, AUL_K_ARGV0, buf);
}
if (buf) { /*Prevent FIX: ID 38717 */
diff --git a/src/simple_util.c b/src/simple_util.c
index 95c7d14a..9e1c580b 100755
--- a/src/simple_util.c
+++ b/src/simple_util.c
@@ -165,7 +165,7 @@ char *__proc_get_cmdline_bypid(int pid)
}
ptr++;
- if (*ptr == NULL)
+ if (!(*ptr))
break;
// ignore trailing "--"
@@ -190,7 +190,6 @@ char *__proc_get_exe_bypid(int pid)
{
char buf[MAX_CMD_BUFSZ];
char buf2[MAX_CMD_BUFSZ];
- int ret;
ssize_t len;
snprintf(buf, sizeof(buf), "/proc/%d/exe", pid);