ref: d80ec38b8db4759c447b546b689d46de22c2e501
parent: 78fc2830c2af10627e870844fe26b37e75d96c0c
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);