diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 1999-02-28 14:14:13 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 1999-02-28 14:14:13 +0000 |
commit | 34c6e1c5cb003b96fb5472bdf0fbded23b063e91 (patch) | |
tree | 6ca212f10f27a66a5c6f9a84bef66b5ff77dce98 /kerberosIV | |
parent | 1df7cc83b1ec9fa495c15e931465cd0d52ce497c (diff) |
Don't break when TheseCells or ThisCell contains empty lines
Diffstat (limited to 'kerberosIV')
-rw-r--r-- | kerberosIV/kafs/common.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kerberosIV/kafs/common.c b/kerberosIV/kafs/common.c index b294f1aa594..7ec08a022f5 100644 --- a/kerberosIV/kafs/common.c +++ b/kerberosIV/kafs/common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: common.c,v 1.5 1998/08/12 23:49:04 art Exp $ */ +/* $OpenBSD: common.c,v 1.6 1999/02/28 14:14:12 art Exp $ */ /* $KTH: common.c,v 1.10 1998/04/04 13:08:31 assar Exp $ */ /* @@ -187,6 +187,10 @@ find_cells(char *file, char ***cells, int *index) while (fgets(cell, sizeof(cell), f)) { char *nl = strchr(cell, '\n'); if (nl) *nl = 0; + + /* skip blank lines */ + if (!cell[0]) continue; + for(i = 0; i < ind; i++) if(strcmp((*cells)[i], cell) == 0) break; |