1
0
This commit is contained in:
dtb 2024-01-17 21:29:46 -07:00
parent 28c3448eda
commit d46a189914

13
mm/mm.c
View File

@ -143,17 +143,16 @@ Io_fileindex(struct Io *io, FILE *f){
} }
/* Returns the corresponding file name in the io struct to the FILE pointer f, /* Returns the corresponding file name in the io struct to the FILE pointer f,
* or NULL if f isn't in io->files or io->ex->files. */ * or NULL if f is NULL or isn't in io->files or io->ex->files. */
static char * static char *
Io_filename(struct Io *io, FILE *f){ Io_filename(struct Io *io, FILE *f){
int i; int i;
if((i = Io_fileindex(io, f)) == -1) return (f == NULL || (i = Io_fileindex(io, f)) == -1)
return NULL; ? NULL
else if(i < io->s - 1) : (i < io->s - 1)
return io->names[i]; ? io->names[i]
else : io->ex->names[i - io->s];
return io->ex->names[i - io->s];
} }
static struct Io *Io_fremove(struct Io *io, FILE *f); static struct Io *Io_fremove(struct Io *io, FILE *f);