]> ruderich.org/simon Gitweb - tlsproxy/tlsproxy.git/blobdiff - src/sem.c
src/tlsproxy-add,src/tlsproxy-setup: Cleanup.
[tlsproxy/tlsproxy.git] / src / sem.c
index 0122390731bfde3b3db8b3d69addfd4fef38b80d..3c911cde10ff820ca06247df2d91b3b18e93422e 100644 (file)
--- a/src/sem.c
+++ b/src/sem.c
@@ -1,7 +1,7 @@
 /*
  * Simple semaphore implementation, P() and V().
  *
- * Copyright (C) 2011  Simon Ruderich
+ * Copyright (C) 2011-2013  Simon Ruderich
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ struct SEM {
 };
 
 SEM *sem_init(int init_value) {
-    SEM *sem = (SEM *)malloc(sizeof(SEM));
+    SEM *sem = malloc(sizeof(*sem));
     if (NULL == sem) {
         return NULL;
     }