projects
/
platform
/
upstream
/
libgc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b6e330
)
Eliminate 'possibly incorrect assignment in CORD_vsprintf' compiler warning
author
Ivan Maidanski
<ivmai@mail.ru>
Tue, 29 May 2018 17:45:23 +0000
(20:45 +0300)
committer
Ivan Maidanski
<ivmai@mail.ru>
Tue, 29 May 2018 17:45:23 +0000
(20:45 +0300)
* cord/cordprnt.c (CORD_vsprintf): Replace while((c=expr)) with
while((c=expr)!=0).
cord/cordprnt.c
patch
|
blob
|
history
diff --git
a/cord/cordprnt.c
b/cord/cordprnt.c
index
cfe1de4
..
2dd5691
100644
(file)
--- a/
cord/cordprnt.c
+++ b/
cord/cordprnt.c
@@
-275,7
+275,7
@@
int CORD_vsprintf(CORD * out, CORD format, va_list args)
char * str = va_arg(args, char *);
char c;
- while ((c = *str++)) {
+ while ((c = *str++)
!= '\0'
) {
CORD_ec_append(result, c);
}
goto done;
@@
-362,7
+362,7
@@
int CORD_vsprintf(CORD * out, CORD format, va_list args)
if (buf != result[0].ec_bufptr) {
char c;
- while ((c = *buf++)) {
+ while ((c = *buf++)
!= '\0'
) {
CORD_ec_append(result, c);
}
} else {