diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-24 21:26:53 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-24 21:26:53 +0200 |
commit | df247efec654e512242e4f4f1b0212034f9e01fe (patch) | |
tree | 25c02e16957f3aa613af30c140fd8e8a3d52fda6 /app/wlib/gtklib/wpref.c | |
parent | d0b6a8a4ec298024f14f704f9e40a6f9d324ccf3 (diff) | |
parent | a5ade52caa489cf0a713e0f02b764000d203140e (diff) |
Merge branch 'release/debian/1%5.2.0Beta2.1-1' into masterdebian/1%5.2.0Beta2.1-1
Diffstat (limited to 'app/wlib/gtklib/wpref.c')
-rw-r--r-- | app/wlib/gtklib/wpref.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/wlib/gtklib/wpref.c b/app/wlib/gtklib/wpref.c index c2541f9..124305a 100644 --- a/app/wlib/gtklib/wpref.c +++ b/app/wlib/gtklib/wpref.c @@ -168,7 +168,7 @@ const char * wGetAppWorkDir( if ( stat( appEtcConfig, &stFileInfo ) == 0 ) { char copyConfigCmd[(BUFSIZ * 2) + 3]; sprintf( copyConfigCmd, "cp %s %s", appEtcConfig, appWorkDir ); - system( copyConfigCmd ); + int rc = system( copyConfigCmd ); } } } @@ -293,7 +293,7 @@ void wPrefSetString( if (p->val) free(p->val); p->dirty = TRUE; - p->val = strdup( sval ); + p->val = (sval?strdup( sval ):NULL); return; } } @@ -302,7 +302,7 @@ void wPrefSetString( p->name = strdup(name); p->section = strdup(section); p->dirty = TRUE; - p->val = strdup(sval); + p->val = (sval?strdup(sval):NULL); } /** @@ -456,7 +456,9 @@ void wPrefFlush( return; for (p=&prefs(0); p<&prefs(prefs_da.cnt); p++) { - fprintf( prefFile, "%s.%s: %s\n", p->section, p->name, p->val ); + if(p->val) { + fprintf( prefFile, "%s.%s: %s\n", p->section, p->name, p->val ); + } } fclose( prefFile ); } |