]> git.pond.sub.org Git - empserver/commitdiff
(loc_Sem_t, empth_sem_t) [_WIN32]: empthread.h defines empth_sem_t as
authorRon Koenderink <rkoenderink@yahoo.ca>
Sun, 26 Jun 2005 18:31:14 +0000 (18:31 +0000)
committerRon Koenderink <rkoenderink@yahoo.ca>
Sun, 26 Jun 2005 18:31:14 +0000 (18:31 +0000)
incomplete type struct loc_Sem_t.  Instead of completing it here, the
code defined an unrelated type loc_Sem_t as (complete) type struct
empth_sem_t.  The resulting type errors were swept under the carpet
with casts.  Obvious fix.

src/lib/empthread/ntthread.c

index c74758a7e2d3a5cfc07c3de936fb4e3b67a3b3d5..a5158059874226f3e985308d3cf48e3cb873785a 100644 (file)
@@ -100,7 +100,7 @@ typedef struct loc_Thread_t {
  * The REAL empth_sem_t structure.
  * The external world only gets a void pointer to this.
  */
-typedef struct empth_sem_t {
+typedef struct loc_Sem_t {
 
     char szName[17];
 
@@ -673,7 +673,7 @@ empth_sem_create(char *name, int cnt)
 void
 empth_sem_signal(empth_sem_t *sm)
 {
-    loc_Sem_t *pSem = (loc_Sem_t *)sm;
+    loc_Sem_t *pSem = sm;
 
     loc_debug("signal on semaphore %s:%d", pSem->szName, pSem->count);
 
@@ -697,7 +697,7 @@ empth_sem_wait(empth_sem_t *sm)
 {
     loc_Thread_t *pThread =
        (loc_Thread_t *)TlsGetValue(loc_GVAR.dwTLSIndex);
-    loc_Sem_t *pSem = (loc_Sem_t *)sm;
+    loc_Sem_t *pSem = sm;
 
     loc_debug("wait on semaphore %s:%d", pSem->szName, pSem->count);