build: Combine CFLAGS and DEBUG_CFLAGS.
[dss.git] / ipc.c
diff --git a/ipc.c b/ipc.c
index c6f7e6b00f52c466ea051a40c188c739c7fd060b..c55554c5d3fd815cd09c045a94f7b72d5bd5db85 100644 (file)
--- a/ipc.c
+++ b/ipc.c
@@ -228,7 +228,7 @@ error:
        return ret;
 }
 
-static inline int get_key_or_die(char *config_file)
+static int get_key_or_die(const char *config_file)
 {
        int ret;
        struct stat statbuf;
@@ -285,7 +285,6 @@ static int do_semop(int id, struct sembuf *sops, int num)
 static int mutex_lock(int id)
 {
        struct sembuf sops[4];
-       int ret;
 
        DSS_DEBUG_LOG(("locking\n"));
 
@@ -305,10 +304,7 @@ static int mutex_lock(int id)
        sops[3].sem_op = 1;
        sops[3].sem_flg = SEM_UNDO | IPC_NOWAIT;
 
-       ret = do_semop(id, sops, 4);
-       if (ret < 0)
-               return -ERRNO_TO_DSS_ERROR(errno);
-       return 1;
+       return do_semop(id, sops, 4);
 }
 
 static bool mutex_is_locked(int id)