diff options
author | 2016-06-17 16:39:51 -0400 | |
---|---|---|
committer | 2016-06-17 16:39:51 -0400 | |
commit | 5ac04f029f2876284e8af10275bdd63e75fc90e7 (patch) | |
tree | a8a6ad5188dbfc5425825a73c19a659c9c7c8520 /src/c/urweb.c | |
parent | 6dad7c645d8fdb7b7237c89ff7b34e90adbb86b1 (diff) |
Prepare Postgres code for NULL error fields
Diffstat (limited to 'src/c/urweb.c')
-rw-r--r-- | src/c/urweb.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c index 286ec7be..afe8457b 100644 --- a/src/c/urweb.c +++ b/src/c/urweb.c @@ -4968,3 +4968,10 @@ void uw_Sqlcache_flush(uw_context ctx, uw_Sqlcache_Cache *cache, char **keys) { } pthread_rwlock_unlock(&cache->lockIn); } + +int strcmp_nullsafe(const char *str1, const char *str2) { + if (str1) + return strcmp(str1, str2); + else + return 1; +} |