diff options
author | dzwdz | 2021-09-21 18:52:20 +0200 |
---|---|---|
committer | dzwdz | 2021-09-21 18:52:20 +0200 |
commit | ad81d4904ca9f710cf4d56de31eca994dc005844 (patch) | |
tree | a738b352dac7eea1001a1f8ee6a3ff7b6cb32990 /src/kernel/mem/virt.c | |
parent | d9ec06192725bb6bf023120e99cbe8da33756628 (diff) |
start using sparse's `-Wnon-pointer-null`
While I personally don't see a reason to use NULL instead of 0, I assume
that whoever made that a sparse default knew what they were doing.
Diffstat (limited to 'src/kernel/mem/virt.c')
-rw-r--r-- | src/kernel/mem/virt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/mem/virt.c b/src/kernel/mem/virt.c index 1fa5a10..b15297e 100644 --- a/src/kernel/mem/virt.c +++ b/src/kernel/mem/virt.c @@ -6,7 +6,7 @@ void virt_iter_new( struct virt_iter *iter, void __user *virt, size_t length, struct pagedir *pages, bool user, bool writeable) { - iter->frag = 0; + iter->frag = NULL; iter->frag_len = 0; iter->prior = 0; iter->error = false; @@ -35,7 +35,7 @@ bool virt_iter_next(struct virt_iter *iter) { iter->frag = pagedir_virt2phys(iter->_pages, iter->_virt, iter->_user, iter->_writeable); - if (iter->frag == 0) { + if (!iter->frag) { iter->error = true; return false; } |