[Frugalware-darcs] setup: util: modofied data_put(): update the
value only, if possible
VMiklos
vmiklos at frugalware.org
Wed Mar 29 23:49:43 CEST 2006
[util: modofied data_put(): update the value only, if possible
VMiklos <vmiklos at frugalware.org>**20051112011441] {
hunk ./src/util.c 94
- data_t *dp = data_new();
+ int i;
+ data_t *dp;
+
+ for (i=0; i<g_list_length(*config); i++)
+ {
+ dp = g_list_nth_data(*config, i);
+ if(!strcmp(name, dp->name))
+ {
+ dp->data=data;
+ return;
+ }
+ }
+
+ dp = data_new();
}
More information about the Frugalware-darcs
mailing list