X-Git-Url: http://git.tuebingen.mpg.de/dss.git/log?a=blobdiff_plain;f=ipc.c;h=f0a8341de57f0a7db4c25ef2944e70b8d04c33ee;hb=01af36ee3cd794f4332c4898828a31aafe0a939f;hp=c6f7e6b00f52c466ea051a40c188c739c7fd060b;hpb=ee132d4f3e81eaaaeee94ceaf9f960c50bc7d448;p=dss.git diff --git a/ipc.c b/ipc.c index c6f7e6b..f0a8341 100644 --- a/ipc.c +++ b/ipc.c @@ -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)