ObjFW  Check-in [48b0063c3f]

Overview
Comment:OFCountedMapTableSet: Fix uninitialized variable
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 48b0063c3f060d05882286826e1bc2fb277f54287090c896bbc7bb1577fb43f1
User & Date: js on 2022-04-19 16:28:56
Other Links: manifest | tags
Context
2022-04-19
16:31
OFSPX*SocketTests: Fix uninitialized variable check-in: d2f5faf5ef user: js tags: trunk
16:28
OFCountedMapTableSet: Fix uninitialized variable check-in: 48b0063c3f user: js tags: trunk
16:28
OFSettings: Fix release after throw check-in: 5479feef2d user: js tags: trunk
Changes

Modified src/OFCountedMapTableSet.m from [7493fdfb12] to [d7ae224517].

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
	self = [self init];

	@try {
		void *pool = objc_autoreleasePoolPush();

		if ([set isKindOfClass: [OFCountedSet class]]) {
			OFCountedSet *countedSet = (OFCountedSet *)countedSet;

			for (id object in countedSet) {
				size_t count =
				    [countedSet countForObject: object];

				for (size_t i = 0; i < count; i++)
					[self addObject: object];







|







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
	self = [self init];

	@try {
		void *pool = objc_autoreleasePoolPush();

		if ([set isKindOfClass: [OFCountedSet class]]) {
			OFCountedSet *countedSet = (OFCountedSet *)set;

			for (id object in countedSet) {
				size_t count =
				    [countedSet countForObject: object];

				for (size_t i = 0; i < count; i++)
					[self addObject: object];