Fossil SCM

Cherrypick [ff192614]: Use fossil_strdup() consistent with the rest of the code.

andygoth 2015-05-02 20:21 trunk
Commit f8315ee9004a017c1b3fb018284de29330882b88
2 files changed +1 -1 +1 -1
+1 -1
--- src/db.c
+++ src/db.c
@@ -1927,11 +1927,11 @@
19271927
Blob setting;
19281928
blob_zero(&setting);
19291929
if( blob_read_from_file(&setting, zVersionedPathname) >= 0 ){
19301930
blob_trim(&setting); /* Avoid non-obvious problems with line endings
19311931
** on boolean properties */
1932
- zVersionedSetting = strdup(blob_str(&setting));
1932
+ zVersionedSetting = fossil_strdup(blob_str(&setting));
19331933
}
19341934
blob_reset(&setting);
19351935
/* See if there's a no-warn flag */
19361936
blob_append(&versionedPathname, ".no-warn", -1);
19371937
if( file_size(blob_str(&versionedPathname))>=0 ){
19381938
--- src/db.c
+++ src/db.c
@@ -1927,11 +1927,11 @@
1927 Blob setting;
1928 blob_zero(&setting);
1929 if( blob_read_from_file(&setting, zVersionedPathname) >= 0 ){
1930 blob_trim(&setting); /* Avoid non-obvious problems with line endings
1931 ** on boolean properties */
1932 zVersionedSetting = strdup(blob_str(&setting));
1933 }
1934 blob_reset(&setting);
1935 /* See if there's a no-warn flag */
1936 blob_append(&versionedPathname, ".no-warn", -1);
1937 if( file_size(blob_str(&versionedPathname))>=0 ){
1938
--- src/db.c
+++ src/db.c
@@ -1927,11 +1927,11 @@
1927 Blob setting;
1928 blob_zero(&setting);
1929 if( blob_read_from_file(&setting, zVersionedPathname) >= 0 ){
1930 blob_trim(&setting); /* Avoid non-obvious problems with line endings
1931 ** on boolean properties */
1932 zVersionedSetting = fossil_strdup(blob_str(&setting));
1933 }
1934 blob_reset(&setting);
1935 /* See if there's a no-warn flag */
1936 blob_append(&versionedPathname, ".no-warn", -1);
1937 if( file_size(blob_str(&versionedPathname))>=0 ){
1938
+1 -1
--- src/db.c
+++ src/db.c
@@ -1927,11 +1927,11 @@
19271927
Blob setting;
19281928
blob_zero(&setting);
19291929
if( blob_read_from_file(&setting, zVersionedPathname) >= 0 ){
19301930
blob_trim(&setting); /* Avoid non-obvious problems with line endings
19311931
** on boolean properties */
1932
- zVersionedSetting = strdup(blob_str(&setting));
1932
+ zVersionedSetting = fossil_strdup(blob_str(&setting));
19331933
}
19341934
blob_reset(&setting);
19351935
/* See if there's a no-warn flag */
19361936
blob_append(&versionedPathname, ".no-warn", -1);
19371937
if( file_size(blob_str(&versionedPathname))>=0 ){
19381938
--- src/db.c
+++ src/db.c
@@ -1927,11 +1927,11 @@
1927 Blob setting;
1928 blob_zero(&setting);
1929 if( blob_read_from_file(&setting, zVersionedPathname) >= 0 ){
1930 blob_trim(&setting); /* Avoid non-obvious problems with line endings
1931 ** on boolean properties */
1932 zVersionedSetting = strdup(blob_str(&setting));
1933 }
1934 blob_reset(&setting);
1935 /* See if there's a no-warn flag */
1936 blob_append(&versionedPathname, ".no-warn", -1);
1937 if( file_size(blob_str(&versionedPathname))>=0 ){
1938
--- src/db.c
+++ src/db.c
@@ -1927,11 +1927,11 @@
1927 Blob setting;
1928 blob_zero(&setting);
1929 if( blob_read_from_file(&setting, zVersionedPathname) >= 0 ){
1930 blob_trim(&setting); /* Avoid non-obvious problems with line endings
1931 ** on boolean properties */
1932 zVersionedSetting = fossil_strdup(blob_str(&setting));
1933 }
1934 blob_reset(&setting);
1935 /* See if there's a no-warn flag */
1936 blob_append(&versionedPathname, ".no-warn", -1);
1937 if( file_size(blob_str(&versionedPathname))>=0 ){
1938

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button