[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#37756: [PATCH] Wrong initialization of fringe bitmap
From: |
Carlos Pita |
Subject: |
bug#37756: [PATCH] Wrong initialization of fringe bitmap |
Date: |
Tue, 15 Oct 2019 07:14:25 -0300 |
> Can you explain your reasoning? The loop after that does initialize
Ok, TBH I hadn't looked at the loop. But anyway:
> > xfb = xmalloc (sizeof fb + fb.height * BYTES_PER_BITMAP_ROW);
This allocates fb.height * BYTES_PER_BITMAP_ROW for bits = b.
> > memset (b, 0, fb.height);
This only initializes fb.height bytes to zero.
And then the loop indeed initializes all fb.height *
BYTES_PER_BITMAP_ROW bytes (b being an unsigned short pointer):
j = 0;
while (j < fb.height)
{
...
b[j++] = something;
...
}
So instead of memset (b, 0, fb.height) being incomplete I would now
say that it is redundant and misleading.
- bug#37756: [PATCH] Wrong initialization of fringe bitmap, Carlos Pita, 2019/10/14
- bug#37756: [PATCH] Wrong initialization of fringe bitmap, Eli Zaretskii, 2019/10/15
- bug#37756: [PATCH] Wrong initialization of fringe bitmap,
Carlos Pita <=
- bug#37756: [PATCH] Wrong initialization of fringe bitmap, Carlos Pita, 2019/10/16
- bug#37756: [PATCH] Wrong initialization of fringe bitmap, Eli Zaretskii, 2019/10/16
- bug#37756: [PATCH] Wrong initialization of fringe bitmap, Carlos Pita, 2019/10/16
- bug#37756: [PATCH] Wrong initialization of fringe bitmap, Eli Zaretskii, 2019/10/16
- bug#37756: [PATCH] Wrong initialization of fringe bitmap, Carlos Pita, 2019/10/16
- bug#37756: [PATCH] Wrong initialization of fringe bitmap, Alan Third, 2019/10/17
- bug#37756: [PATCH] Wrong initialization of fringe bitmap, Robert Pluim, 2019/10/17
- bug#37756: [PATCH] Wrong initialization of fringe bitmap, Eli Zaretskii, 2019/10/26