diff options
author | Volker Lendecke <vl@samba.org> | 2008-02-25 15:24:49 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-02-25 16:09:26 +0100 |
commit | 317639287886181edf08ccecad1b324e4cc55d0b (patch) | |
tree | 8388cbc402ff784babdfcd892daa87090497a8a1 /source3/intl | |
parent | cd95385207ff2a9c27031dcff19b7b74df3a626f (diff) | |
download | samba-317639287886181edf08ccecad1b324e4cc55d0b.tar.gz |
Fix some warnings
warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result
(This used to be commit ad37b7b0aee265a3e4d8b7552610f4b9a105434d)
Diffstat (limited to 'source3/intl')
-rw-r--r-- | source3/intl/lang_tdb.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source3/intl/lang_tdb.c b/source3/intl/lang_tdb.c index bb780c5feda..6ad9ef8496b 100644 --- a/source3/intl/lang_tdb.c +++ b/source3/intl/lang_tdb.c @@ -127,7 +127,11 @@ bool lang_tdb_init(const char *lang) if (!lang) return True; - asprintf(&msg_path, "%s.msg", data_path((const char *)lang)); + if (asprintf(&msg_path, "%s.msg", + data_path((const char *)lang)) == -1) { + DEBUG(0, ("asprintf failed\n")); + goto done; + } if (stat(msg_path, &st) != 0) { /* the msg file isn't available */ DEBUG(10, ("lang_tdb_init: %s: %s\n", msg_path, @@ -135,7 +139,10 @@ bool lang_tdb_init(const char *lang) goto done; } - asprintf(&path, "%s%s.tdb", lock_path("lang_"), lang); + if (asprintf(&path, "%s%s.tdb", lock_path("lang_"), lang) == -1) { + DEBUG(0, ("asprintf failed\n")); + goto done; + } DEBUG(10, ("lang_tdb_init: loading %s\n", path)); |