Skip to contentSkip to conversation

tools: change print to %zd for ssize_t

PATCH Applied James Prestwood 2 participants 2 messages Feb 24, 2022

lore
Share & tools
lore

James Prestwood

author
#0 lore raw

PATCH 1/1 tools: change print to %zd for ssize_t

iwd-decrypt-profile was using %ld which isn't portable.

---
 tools/iwd-decrypt-profile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/iwd-decrypt-profile.c +1 -1
index e660c346..e71b56b4 100644
@@ -196,7 +196,7 @@ int main(int argc, char *argv[])
 		close(fd);
 
 		if (len < 0) {
-			printf("Unable to write to %s (%ld)\n", outfile, len);
+			printf("Unable to write to %s (%zd)\n", outfile, len);
 			goto failed;
 		}
 	}
Signature · 1 line
2.34.1
Applied
#1 lore raw

Hi James,

Quoted 5 lines · James Prestwood

iwd-decrypt-profile was using %ld which isn't portable.

---
  tools/iwd-decrypt-profile.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Regards,
-Denis