CoreFW  Check-in [e1a8847e68]

Overview
Comment:Fix "return NULL" in function returning void.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e1a8847e687eef2fca1206d636ff188bd87f88287f3999e5006c65d0042faecb
User & Date: js on 2012-08-26 15:40:43
Other Links: manifest | tags
Context
2012-09-29
22:10
Add stream. check-in: e21a39f7dc user: js tags: trunk
2012-08-26
15:40
Fix "return NULL" in function returning void. check-in: e1a8847e68 user: js tags: trunk
2012-06-13
17:17
Allow NULL for all parameters in object.c. check-in: 80c6e7c622 user: js tags: trunk
Changes

Modified src/object.c from [14050019eb] to [5d8fae987c].

104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130

void
cfw_unref(void *ptr)
{
	CFWObject *obj = ptr;

	if (obj == NULL)
		return NULL;

	if (--obj->ref_cnt == 0)
		cfw_free(obj);
}

void
cfw_free(void *ptr)
{
	CFWObject *obj = ptr;

	if (obj == NULL)
		return NULL;

	if (obj->cls->dtor != NULL)
		obj->cls->dtor(obj);

	free(obj);
}








|











|







104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130

void
cfw_unref(void *ptr)
{
	CFWObject *obj = ptr;

	if (obj == NULL)
		return;

	if (--obj->ref_cnt == 0)
		cfw_free(obj);
}

void
cfw_free(void *ptr)
{
	CFWObject *obj = ptr;

	if (obj == NULL)
		return;

	if (obj->cls->dtor != NULL)
		obj->cls->dtor(obj);

	free(obj);
}