Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 468354
Collapse All | Expand All

(-)alsa-utils-1.0.27.org/alsactl/lock.c (-1 / +3 lines)
Lines 35-41 Link Here
35
	int fd = -1, err = 0;
35
	int fd = -1, err = 0;
36
	struct flock lck;
36
	struct flock lck;
37
	struct stat st;
37
	struct stat st;
38
	char lcktxt[11];
38
	char lcktxt[20];
39
	char *nfile;
39
	char *nfile;
40
40
41
	if (!do_lock)
41
	if (!do_lock)
Lines 53-58 Link Here
53
	lck.l_len = 11;
53
	lck.l_len = 11;
54
	lck.l_pid = 0;
54
	lck.l_pid = 0;
55
	if (lock) {
55
	if (lock) {
56
		// NOTE `long` type on amd64, being printed, could take up to 18 decimal digits
57
		// (according output of std::numeric_limits<long>::digits10)
56
		sprintf(lcktxt, "%10li\n", (long)getpid());
58
		sprintf(lcktxt, "%10li\n", (long)getpid());
57
	} else {
59
	} else {
58
		sprintf(lcktxt, "%10s\n", "");
60
		sprintf(lcktxt, "%10s\n", "");

Return to bug 468354