diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-08 11:53:12 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-08 11:53:12 +0200 |
commit | e50482f994b6ebcce864a412111d376e99205cdb (patch) | |
tree | ff3192c6aaf213c4922521bed988e4ed4147f537 /app/wlib/gtklib/wpref.c | |
parent | d3897ce090dbeb220ed2c782f095597e417cf3cc (diff) | |
parent | b623f5953691b2a0614e6f1f4def86bdbb9a4113 (diff) |
Update upstream source from tag 'upstream/5.2.0Beta2.1'
Update to upstream version '5.2.0Beta2.1'
with Debian dir 1576f25f4c1496abfed44af31ead67d32c7be650
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 ); } |