mirror of https://github.com/aria2/aria2
2010-10-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed unused variable r. * src/StringFormat.ccpull/1/head
parent
9ff8e55d04
commit
17a0a5baad
|
@ -1,3 +1,8 @@
|
||||||
|
2010-10-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
|
Removed unused variable r.
|
||||||
|
* src/StringFormat.cc
|
||||||
|
|
||||||
2010-10-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
2010-10-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
Added printf format check attribute.
|
Added printf format check attribute.
|
||||||
|
|
|
@ -46,8 +46,7 @@ StringFormat::StringFormat(const char* fmt, ...)
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
int r;
|
if(vsnprintf(buf, sizeof(buf), fmt, ap) > 0) {
|
||||||
if((r = vsnprintf(buf, sizeof(buf), fmt, ap)) > 0) {
|
|
||||||
msg_ = buf;
|
msg_ = buf;
|
||||||
}
|
}
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
Loading…
Reference in New Issue