]> mj.ucw.cz Git - pciutils.git/blobdiff - lspci.c
Bug fixes to format_agp_rate().
[pciutils.git] / lspci.c
diff --git a/lspci.c b/lspci.c
index 6e0a77fd4857540342caf0e2cce938af1f5ff431..af94eeb0aa2bb2b5c042142597204f9ef3a99811 100644 (file)
--- a/lspci.c
+++ b/lspci.c
@@ -404,8 +404,7 @@ format_agp_rate(int rate, char *buf, int agp3)
       {
        if (c != buf)
          *c++ = ',';
-       *c++ = 'x';
-       *c++ = '0' + (1 << (i + 2*agp3));
+       c += sprintf(c, "x%d", 1 << (i + 2*agp3));
       }
   if (c != buf)
     *c = 0;
@@ -417,7 +416,7 @@ static void
 show_agp(struct device *d, int where, int cap)
 {
   u32 t;
-  char rate[8];
+  char rate[16];
   int ver, rev;
   int agp3 = 0;