appl/afsutil: expand_cell_name return NULL if not found

In function ‘afslog_cell.isra’:
  afslog.c:144:13: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
  144 |            warnx("No cell matching \"%s\" found.", cell);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

caused by expand_cell_name() returning the input pointer.
Alter the behavior of expand_cell_name() to match its usage.

Change-Id: I3b15c4b3e59b597af5351e5e62f5d7751be50feb
This commit is contained in:
Jeffrey Altman
2022-01-21 08:51:28 -05:00
parent 8dcc5e617b
commit cd91a3a03e

View File

@@ -118,7 +118,7 @@ expand_cell_name(const char *cell)
if(c)
return c;
}
return cell;
return NULL;
}
static void