ref: 3cb3a733aa6d3c48f8695ed78a35af9710e1c406
parent: f67f3adf59246760c07cc8ba5f709dea672ec176
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Sun Jan 5 22:36:46 EST 2025
ios: make things less confusing for clang-analyzer
--- a/ios.c
+++ b/ios.c
@@ -154,7 +154,7 @@
if(temp == nil)
return nil;
s->ownbuf = 1;
- if(s->size > 0)
+ if(s->buf != nil)
memcpy(temp, s->buf, s->size);
}
@@ -594,7 +594,7 @@
buf = MEM_ALLOC(s->size+1);
if(buf == nil)
return nil;
- if(s->size)
+ if(s->buf != nil)
memcpy(buf, s->buf, s->size);
}else if(s->size == s->maxsize){
buf = MEM_REALLOC(s->buf, s->size + 1);