Revision: 50680
http://brlcad.svn.sourceforge.net/brlcad/?rev=50680&view=rev
Author: tbrowder2
Date: 2012-05-24 21:40:53 +0000 (Thu, 24 May 2012)
Log Message:
-----------
combine decl with initialization
Modified Paths:
--------------
brlcad/trunk/src/libbu/vls.c
Modified: brlcad/trunk/src/libbu/vls.c
===================================================================
--- brlcad/trunk/src/libbu/vls.c 2012-05-24 21:36:18 UTC (rev 50679)
+++ brlcad/trunk/src/libbu/vls.c 2012-05-24 21:40:53 UTC (rev 50680)
@@ -1067,56 +1067,46 @@
case 'i':
if (flags & LONG_INT) {
/* Long int */
- long l;
-
- l = va_arg(ap, long);
+ long l = va_arg(ap, long);
if (flags & FIELDLEN)
snprintf(buf, BUFSIZ, fbufp, fieldlen, l);
else
snprintf(buf, BUFSIZ, fbufp, l);
} else if (flags & LLONGINT) {
/* Long long int */
- long long ll;
-
- ll = va_arg(ap, long long);
+ long long ll = va_arg(ap, long long);
if (flags & FIELDLEN)
snprintf(buf, BUFSIZ, fbufp, fieldlen, ll);
else
snprintf(buf, BUFSIZ, fbufp, ll);
} else if (flags & SHORTINT || flags & SHHRTINT) {
/* short int */
- short int sh;
- sh = (short int)va_arg(ap, int);
+ short int sh = (short int)va_arg(ap, int);
if (flags & FIELDLEN)
snprintf(buf, BUFSIZ, fbufp, fieldlen, sh);
else
snprintf(buf, BUFSIZ, fbufp, sh);
} else if (flags & INTMAX_T) {
- intmax_t im;
- im = va_arg(ap, intmax_t);
+ intmax_t im = va_arg(ap, intmax_t);
if (flags & FIELDLEN)
snprintf(buf, BUFSIZ, fbufp, fieldlen, im);
else
snprintf(buf, BUFSIZ, fbufp, im);
} else if (flags & PTRDIFFT) {
- ptrdiff_t pd;
- pd = va_arg(ap, ptrdiff_t);
+ ptrdiff_t pd = va_arg(ap, ptrdiff_t);
if (flags & FIELDLEN)
snprintf(buf, BUFSIZ, fbufp, fieldlen, pd);
else
snprintf(buf, BUFSIZ, fbufp, pd);
} else if (flags & SIZETINT) {
- size_t st;
- st = va_arg(ap, size_t);
+ size_t st = va_arg(ap, size_t);
if (flags & FIELDLEN)
snprintf(buf, BUFSIZ, fbufp, fieldlen, st);
else
snprintf(buf, BUFSIZ, fbufp, st);
} else {
/* Regular int */
- int j;
-
- j = va_arg(ap, int);
+ int j = va_arg(ap, int);
if (flags & FIELDLEN)
snprintf(buf, BUFSIZ, fbufp, fieldlen, j);
else
@@ -1128,8 +1118,7 @@
case 'p':
/* all pointer == "void *" */
{
- void *vp;
- vp = (void *)va_arg(ap, void *);
+ void *vp = (void *)va_arg(ap, void *);
if (flags & FIELDLEN)
snprintf(buf, BUFSIZ, fbufp, fieldlen, vp);
else
@@ -1143,12 +1132,9 @@
default:
{
/* Something weird, maybe %c */
- int j;
-
/* We hope, whatever it is, it fits in an int and the
resulting
stringlet is smaller than sizeof(buf) bytes */
-
- j = va_arg(ap, int);
+ int j = va_arg(ap, int);
if (flags & FIELDLEN)
snprintf(buf, BUFSIZ, fbufp, fieldlen, j);
else
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits