aboutsummaryrefslogtreecommitdiff
path: root/ft_strdup.s
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2021-02-11 15:44:44 +0100
committerCharles Cabergs <me@cacharle.xyz>2021-02-11 15:44:44 +0100
commitd6240e3f6aeb342aaf13284c7cc93226970648aa (patch)
treea5fef5bd1d55e0dd63cb986a445254cf8caa94ce /ft_strdup.s
parentcd5c9e6a923878e797212d27476ee217eb844a14 (diff)
downloadlibasm-d6240e3f6aeb342aaf13284c7cc93226970648aa.tar.gz
libasm-d6240e3f6aeb342aaf13284c7cc93226970648aa.tar.bz2
libasm-d6240e3f6aeb342aaf13284c7cc93226970648aa.zip
Replaced tab with spaces
Diffstat (limited to 'ft_strdup.s')
-rw-r--r--ft_strdup.s26
1 files changed, 13 insertions, 13 deletions
diff --git a/ft_strdup.s b/ft_strdup.s
index 346f2b4..09ae2ba 100644
--- a/ft_strdup.s
+++ b/ft_strdup.s
@@ -32,20 +32,20 @@ global M_FT_STRDUP
section .text
; char *ft_strdup(const char *str);
M_FT_STRDUP:
- push rdi ; save rdi because it will be overwrite for malloc
+ push rdi ; save rdi because it will be overwrite for malloc
- call M_FT_STRLEN ; rdi is still == str
- inc rax ; len++ for '\0'
+ call M_FT_STRLEN ; rdi is still == str
+ inc rax ; len++ for '\0'
- mov rdi, rax ; size to malloc
- call M_MALLOC wrt ..plt
- cmp rax, 0
- je FT_STRDUP_ERROR
+ mov rdi, rax ; size to malloc
+ call M_MALLOC wrt ..plt
+ cmp rax, 0
+ je FT_STRDUP_ERROR
- pop rsi ; original str as src
- mov rdi, rax ; allocated as dest
- call M_FT_STRCPY
- ret
+ pop rsi ; original str as src
+ mov rdi, rax ; allocated as dest
+ call M_FT_STRCPY
+ ret
FT_STRDUP_ERROR:
- pop rdi
- ret
+ pop rdi
+ ret