diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2021-07-16 13:29:50 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2021-07-16 13:29:50 +0000 |
commit | 731ac0051f58025163e716dbd6ae8523ccab75dd (patch) | |
tree | 29f15387be255f7eca696203f186bd316a9e8158 | |
parent | c6e1fb972c8191566d0ff956628f83963de6bad4 (diff) |
Compare pointer to NULL, not 0.
-rw-r--r-- | sbin/fdisk/gpt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/fdisk/gpt.c b/sbin/fdisk/gpt.c index 3ef8548d98c..3ed8662cc61 100644 --- a/sbin/fdisk/gpt.c +++ b/sbin/fdisk/gpt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gpt.c,v 1.44 2021/07/16 13:26:04 krw Exp $ */ +/* $OpenBSD: gpt.c,v 1.45 2021/07/16 13:29:49 krw Exp $ */ /* * Copyright (c) 2015 Markus Muller <mmu@grummel.net> * Copyright (c) 2015 Kenneth R Westerback <krw@openbsd.org> @@ -61,7 +61,7 @@ get_header(const uint64_t sector) uint32_t orig_gh_csum, new_gh_csum; secbuf = DISK_readsector(sector); - if (secbuf == 0) + if (secbuf == NULL) return -1; memcpy(&gh, secbuf, sizeof(struct gpt_header)); |