[pacman-dev] [PATCH] package.c, fix incorrect buffersize

Pierre Neidhardt ambrevar at gmail.com
Sun Nov 1 09:33:43 UTC 2015


This is ANSI C: `sizeof` returns the size of the object in bytes.

When the argument is a static array, this is one of the exceptions to the rule
that the `array of T` is automatically converted to a `pointer to T`. Thus
`sizeof` will return the size in bytes of the entire array.

See _The C Programming Language_, some C draft out there, or
<https://en.wikipedia.org/wiki/Sizeof>.

-- 
Pierre Neidhardt

cursor address, n:
	"Hello, cursor!"
		-- Stan Kelly-Bootle, "The Devil's DP Dictionary"


More information about the pacman-dev mailing list