summaryrefslogtreecommitdiffstats
path: root/src/cmd/proof/font.c
diff options
context:
space:
mode:
authorDan Cross <cross@gajendra.net>2025-07-24 14:22:18 +0000
committerDan Cross <cross@gajendra.net>2025-07-24 15:45:31 +0000
commit4089e29e89026f0b581155987d5f683d7635fd13 (patch)
tree168b0306e87f3a7c1c42f81e656cf0054add7371 /src/cmd/proof/font.c
parent564d45b5a55adeb48f69fdecb2bf4ed1f909850b (diff)
downloadplan9port-4089e29e89026f0b581155987d5f683d7635fd13.tar.gz
plan9port-4089e29e89026f0b581155987d5f683d7635fd13.zip
warnings: fix warnings on newer compilers
Mostly turning the crank on fixing simple warnings: arrays, for instance, can never be nil. A couple of pointers should have been initialized to `nil` before being tested. Some logic in `troff` was simplified: basically, an `if` statement had a condition that must have always been true if that section of code were being executed at all.
Diffstat (limited to 'src/cmd/proof/font.c')
-rw-r--r--src/cmd/proof/font.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/proof/font.c b/src/cmd/proof/font.c
index 5cd68623..b0de3026 100644
--- a/src/cmd/proof/font.c
+++ b/src/cmd/proof/font.c
@@ -177,8 +177,8 @@ loadfontname(int n, char *s)
if (strcmp(s, fname[n]) == 0)
return;
- if(fname[n] && fname[n][0]){
- if(lastload[n] && strcmp(lastload[n], fname[n]) == 0)
+ if(fname[n][0]){
+ if(strcmp(lastload[n], fname[n]) == 0)
return;
strcpy(lastload[n], fname[n]);
}