summaryrefslogtreecommitdiff
path: root/build/misc.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-10-28 10:38:40 +0300
committerPanu Matilainen <pmatilai@redhat.com>2010-10-28 10:38:40 +0300
commit98aff6e658a15202ebacd49c8a970be7affb6e5c (patch)
tree4464bc3226c41063a9441f569d4c3db25adb0d1d /build/misc.c
parenta32705e737988512113bf21c7d067de6f49b4470 (diff)
downloadlibrpm-tizen-98aff6e658a15202ebacd49c8a970be7affb6e5c.tar.gz
librpm-tizen-98aff6e658a15202ebacd49c8a970be7affb6e5c.tar.bz2
librpm-tizen-98aff6e658a15202ebacd49c8a970be7affb6e5c.zip
Handle NULL sb in getStringBuf() cleanly
Diffstat (limited to 'build/misc.c')
-rw-r--r--build/misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/build/misc.c b/build/misc.c
index 16be0351f..f0732a82b 100644
--- a/build/misc.c
+++ b/build/misc.c
@@ -59,7 +59,7 @@ void stripTrailingBlanksStringBuf(StringBuf sb)
char * getStringBuf(StringBuf sb)
{
- return sb->buf;
+ return (sb != NULL) ? sb->buf : NULL;
}
void appendStringBufAux(StringBuf sb, const char *s, int nl)