Revision 2411 src/colorlabel.c

colorlabel.c (revision 2411)
393 393
	return 0;
394 394
}
395 395

  
396
void colorlabel_write_config(void)
396
gint colorlabel_write_config(void)
397 397
{
398 398
	gchar *path;
399 399
	PrefFile *pfile;
......
406 406
	if ((pfile = prefs_file_open(path)) == NULL) {
407 407
		g_warning("failed to write colorlabelrc");
408 408
		g_free(path);
409
		return;
409
		return -1;
410 410
	}
411 411

  
412 412
	for (i = 0; i < LABEL_COLORS_ELEMS; i++) {
......
419 419
			FILE_OP_ERROR(path, "fputs || fputc");
420 420
			prefs_file_close_revert(pfile);
421 421
			g_free(path);
422
			return;
422
			return -1;
423 423
		}
424 424
	}
425 425

  
426 426
	if (prefs_file_close(pfile) < 0) {
427 427
		g_warning("failed to write colorlabelrc");
428
		g_free(path);
429
		return -1;
428 430
	}
431

  
432
	g_free(path);
433

  
434
	return 0;
429 435
}

Also available in: Unified diff