libc: Keep printf("%pS", p) behavior consistent

When ALLSYMS is not turned on, %pS will be treated as %p

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai
2023-02-03 11:06:37 +08:00
committed by Petro Karashchenko
parent e710ae5daf
commit 35ae47788b
+2 -3
View File
@@ -1145,10 +1145,10 @@ str_lpad:
continue; continue;
} }
#ifdef CONFIG_ALLSYMS
case 'S': case 'S':
case 's': case 's':
{ {
#ifdef CONFIG_ALLSYMS
FAR const struct symtab_s *symbol; FAR const struct symtab_s *symbol;
FAR void *addr = (FAR void *)(uintptr_t)x; FAR void *addr = (FAR void *)(uintptr_t)x;
size_t symbolsize; size_t symbolsize;
@@ -1171,10 +1171,9 @@ str_lpad:
continue; continue;
} }
#endif
break; break;
} }
#endif
default: default:
fmt_ungetc(fmt); fmt_ungetc(fmt);