Using the API function prevents the compiler warning
awesome-client.c:200: warning: ignoring return value of 'asprintf',
declared with attribute
warn_unused_result. Besides from that it is a good idea to use the
API-version because it checks for malloc-problems.
---
 awesome-client.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/awesome-client.c b/awesome-client.c
index a70f4f0..c55f0d7 100644
--- a/awesome-client.c
+++ b/awesome-client.c
@@ -197,7 +197,7 @@ main(int argc, char **argv)
 
     if(isatty(STDIN_FILENO))
     {
-        asprintf(&prompt, "awes...@%s%% ", display ? display : "unknown");
+        a_asprintf(&prompt, "awes...@%s%% ", display ? display : "unknown");
         while((msg = readline(prompt)))
             if((msg_len = a_strlen(msg)))
             {

Reply via email to