File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -29,10 +29,12 @@ static Boolean ingroupset(gidset_t gid) {
2929 static gidset_t * gidset ;
3030 static Boolean initialized = FALSE;
3131 if (!initialized ) {
32- initialized = TRUE;
33- ngroups = getgroups (0 , gidset );
32+ ngroups = getgroups (0 , NULL );
33+ if (ngroups == -1 )
34+ fail ("$&access" , "getgroups: %s" , esstrerror (errno ));
3435 gidset = ealloc (ngroups * sizeof (gidset_t ));
35- getgroups (ngroups , gidset );
36+ assert (getgroups (ngroups , gidset ) != -1 );
37+ initialized = TRUE;
3638 }
3739 for (i = 0 ; i < ngroups ; i ++ )
3840 if (gid == gidset [i ])
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ static char history_comment_char = '#';
3939 */
4040
4141
42- extern void newhistbuffer () {
42+ extern void newhistbuffer (void ) {
4343 assert (histbuffer == NULL );
4444 histbuffer = openbuffer (BUFSIZE );
4545}
@@ -50,7 +50,7 @@ extern void addhistbuffer(char c) {
5050 histbuffer = bufputc (histbuffer , c );
5151}
5252
53- extern char * dumphistbuffer () {
53+ extern char * dumphistbuffer (void ) {
5454 char * s ;
5555 size_t len ;
5656 assert (histbuffer != NULL );
Original file line number Diff line number Diff line change @@ -180,7 +180,8 @@ PRIM(here) {
180180 Ref (List * , cmd , tail );
181181#ifdef PIPE_BUF
182182 if (doclen <= PIPE_BUF ) {
183- pipe (p );
183+ if (pipe (p ) == -1 )
184+ fail ("$&here" , "pipe: %s" , esstrerror (errno ));
184185 ewrite (p [1 ], doc , doclen );
185186 } else
186187#endif
You can’t perform that action at this time.
0 commit comments