firasuke / cross / slibtool

Forked from cross/slibtool 6 months ago
Clone

a87fd1 driver: avoid '\0' when assigning a value to a character type.

Authored and Committed by midipix 8 years ago
    driver: avoid '\0' when assigning a value to a character type.
    
        
file modified
+4 -4
src/driver/slbt_driver_ctx.c CHANGED
@@ -214,7 +214,7 @@ static int slbt_split_argv(
214
214
else if (argv[i][1] == 'o') {
215
215
*targv++ = argv[i];
216
216
217
- if (argv[i][2] == '\0')
217
+ if (argv[i][2] == 0)
218
218
*targv++ = argv[++i];
219
219
}
220
220
@@ -231,7 +231,7 @@ static int slbt_split_argv(
231
231
*targv++ = argv[i++];
232
232
*targv++ = argv[i];
233
233
234
- } else if ((argv[i][1] == 'R') && (argv[i][2] == '\0')) {
234
+ } else if ((argv[i][1] == 'R') && (argv[i][2] == 0)) {
235
235
*targv++ = argv[i++];
236
236
*targv++ = argv[i];
237
237
@@ -304,7 +304,7 @@ static int slbt_init_host_params(
304
304
return -1;
305
305
306
306
slash = strrchr(drvhost->host,'-');
307
- *slash = '\0';
307
+ *slash = 0;
308
308
host->host = drvhost->host;
309
309
cfgmeta->host = cfgcompiler;
310
310
fcompiler = true;
@@ -616,7 +616,7 @@ static int slbt_init_link_params(struct slbt_driver_ctx_impl * ctx)
616
616
return -1;
617
617
618
618
dot = strrchr(ctx->libname,'.');
619
- *dot = '\0';
619
+ *dot = 0;
620
620
621
621
ctx->cctx.libname = ctx->libname;
622
622