setexpr: Silence some diagnostic messages 68/297068/2
authorŁukasz Stelmach <l.stelmach@samsung.com>
Wed, 9 Aug 2023 20:30:05 +0000 (22:30 +0200)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Thu, 10 Aug 2023 08:57:55 +0000 (10:57 +0200)
Neither successful match nor lack thereof should be considered an
extraordinary situation. Thus, neither require printing a message.

Change-Id: If42450a68224cdb5f630b98ca6c8df413806cfa3
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
cmd/setexpr.c

index 4d671e7..233471f 100644 (file)
@@ -215,7 +215,7 @@ int setexpr_regex_sub(char *data, uint data_size, char *nbuf, uint nbuf_size,
 
                if (res == 0) {
                        if (loop == 0) {
-                               printf("%s: No match\n", data);
+                               debug("%s: No match\n", data);
                                return 1;
                        } else {
                                break;
@@ -359,7 +359,7 @@ static int regex_sub_var(const char *name, const char *r, const char *s,
        if (ret)
                return 1;
 
-       printf("%s=%s\n", name, data);
+       debug("%s=%s\n", name, data);
 
        return env_set(name, data);
 }