lint
authorEdward Wang <edward@ucbvax.Berkeley.EDU>
Fri, 24 Feb 1984 08:44:42 +0000 (00:44 -0800)
committerEdward Wang <edward@ucbvax.Berkeley.EDU>
Fri, 24 Feb 1984 08:44:42 +0000 (00:44 -0800)
SCCS-vsn: games/sail/pl_7.c 2.8
SCCS-vsn: games/sail/misc.c 2.3

usr/src/games/sail/misc.c
usr/src/games/sail/pl_7.c

index b86362d..114c20e 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)misc.c      2.2 84/02/23";
+static char *sccsid = "@(#)misc.c      2.3 84/02/23";
 #endif
 #include "externs.h"
 
 #endif
 #include "externs.h"
 
@@ -161,7 +161,8 @@ register struct ship *s;
        if ((fp = fopen(LOGFILE, "r+")) == NULL)
                return;
 #ifdef LOCK_EX
        if ((fp = fopen(LOGFILE, "r+")) == NULL)
                return;
 #ifdef LOCK_EX
-       flock(fileno(fp), LOCK_EX);
+       if (flock(fileno(fp), LOCK_EX) < 0)
+               return;
 #endif
        net = (float)s->file->points / s->specs->pts;
        persons = getw(fp);
 #endif
        net = (float)s->file->points / s->specs->pts;
        persons = getw(fp);
@@ -191,7 +192,7 @@ register struct ship *s;
                        break;
                }
 #ifdef LOCK_EX
                        break;
                }
 #ifdef LOCK_EX
-       flock(fileno(fp), LOCK_UN);
+       (void) flock(fileno(fp), LOCK_UN);
 #endif
        (void) fclose(fp);
 }
 #endif
        (void) fclose(fp);
 }
index 3496ef5..3e09f58 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)pl_7.c      2.7 84/02/23";
+static char *sccsid = "@(#)pl_7.c      2.8 84/02/23";
 #endif
 
 #include "player.h"
 #endif
 
 #include "player.h"
@@ -34,7 +34,6 @@ initscreen()
 #endif
        noecho();
        crmode();
 #endif
        noecho();
        crmode();
-       return 0;
 }
 
 cleanupscreen()
 }
 
 cleanupscreen()