# How to correctly use "Set call type"

**URL:** <https://community.hex-rays.com/t/how-to-correctly-use-set-call-type/138>\
**Category:** IDA General\
**Created:** [February 7, 2025, 7:02am UTC](https://community.hex-rays.com/t/how-to-correctly-use-set-call-type/138 "2025-02-07T07:02:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Uncle](https://avatars.discourse-cdn.com/v4/letter/u/e5b9ba/32.png) [@Uncle](https://community.hex-rays.com/u/Uncle)\
**Post date:** [February 7, 2025, 7:02am UTC](https://community.hex-rays.com/t/how-to-correctly-use-set-call-type/138/1 "2025-02-07T07:02:47Z")

</div>

Hello, I’m working on some arm64 binary code that I dumped from memory. I know there’s a call to `strstr` from the C library, so I set its call type accordingly. However, Hex-Rays is still showing it as a shortened char array. It’s weird because when I set the type for `sscanf`, it shows up as a string literal. Can anyone help explain what the correct usage should be?

sscanf code from decompiler:

```auto
call type: __int64 (*sscanf)(_QWORD, const char *, ...)
              sscanf(v2, "%llx-%llx %s %*s %*s %*s %s", &v36, &v35, v3, v4);
data:00000074131C4999 aLlxLlxSSSSS DCB "%llx-%llx %s %*s %*s %*s %s",0

```

strstr code from decompiler:

```auto
call type: char *strstr(const char *, const char *)
if ( !strstr(v4, aApex)
              && !strstr(v4, aSystem)
              && !strstr(v4, aVendor)

data:00000074131C4B7D aSystem DCB "/system",0
data:00000074131C4B85 aVendor DCB "/vendor/",0 

```

Thanks for the help.

---

<div class="post-metadata">

**Author:** ![ilfak](https://sea2.discourse-cdn.com/flex002/user_avatar/community.hex-rays.com/ilfak/32/49_2.png) [@ilfak](https://community.hex-rays.com/u/ilfak)\
**Post date:** [February 7, 2025, 7:45am UTC](https://community.hex-rays.com/t/how-to-correctly-use-set-call-type/138/2 "2025-02-07T07:45:34Z")

</div>

There are 3 ways to fix this:

- declare these strings as `const char []`
- declare the entire data segment as const by pressing Alt-S and removing the Write attribute (probably an overkill)
- turn off the “Print only constant string literals” in the decompiler analysis options 1 (see Edit, Plugins, Hex-Rays Decompiler options)

---

<div class="post-metadata">

**Author:** ![Uncle](https://avatars.discourse-cdn.com/v4/letter/u/e5b9ba/32.png) [@Uncle](https://community.hex-rays.com/u/Uncle)\
**Post date:** [February 7, 2025, 8:30am UTC](https://community.hex-rays.com/t/how-to-correctly-use-set-call-type/138/3 "2025-02-07T08:30:01Z")

</div>

> [@ilfak](#):
>
> const char

wonderful, the const char works great, thanks!

Any idea about the inconsistency between the sscanf and strstr then? as they are both in the same data section and are both declared as char

---

<div class="post-metadata">

**Author:** ![ilfak](https://sea2.discourse-cdn.com/flex002/user_avatar/community.hex-rays.com/ilfak/32/49_2.png) [@ilfak](https://community.hex-rays.com/u/ilfak)\
**Post date:** [February 7, 2025, 9:34am UTC](https://community.hex-rays.com/t/how-to-correctly-use-set-call-type/138/4 "2025-02-07T09:34:15Z")

</div>

We have special logic for sscanf and other functions with format strings…
