Wed Jan 29 19:04:41 2020 UTC ()
Do not compare a char array to NULL, test for empty string instead.


(martin)
diff -r1.14 -r1.15 src/usr.sbin/sysinst/arch/evbarm/md.c

cvs diff -r1.14 -r1.15 src/usr.sbin/sysinst/arch/evbarm/md.c (expand / switch to unified diff)

--- src/usr.sbin/sysinst/arch/evbarm/md.c 2020/01/27 21:21:22 1.14
+++ src/usr.sbin/sysinst/arch/evbarm/md.c 2020/01/29 19:04:40 1.15
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: md.c,v 1.14 2020/01/27 21:21:22 martin Exp $ */ 1/* $NetBSD: md.c,v 1.15 2020/01/29 19:04:40 martin Exp $ */
2 2
3/* 3/*
4 * Copyright 1997 Piermont Information Systems Inc. 4 * Copyright 1997 Piermont Information Systems Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Based on code written by Philip A. Nelson for Piermont Information 7 * Based on code written by Philip A. Nelson for Piermont Information
8 * Systems Inc. 8 * Systems Inc.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -342,21 +342,21 @@ md_gpt_post_write(struct disk_partitions @@ -342,21 +342,21 @@ md_gpt_post_write(struct disk_partitions
342#endif 342#endif
343 343
344void 344void
345evbarm_part_defaults(struct pm_devs *my_pm, struct part_usage_info *infos, 345evbarm_part_defaults(struct pm_devs *my_pm, struct part_usage_info *infos,
346 size_t num_usage_infos) 346 size_t num_usage_infos)
347{ 347{
348 size_t i; 348 size_t i;
349 349
350 if (boardtype != BOARD_TYPE_NORMAL) 350 if (boardtype != BOARD_TYPE_NORMAL)
351 return; 351 return;
352 352
353 for (i = 0; i < num_usage_infos; i++) { 353 for (i = 0; i < num_usage_infos; i++) {
354 if (infos[i].fs_type == PART_BOOT_TYPE && 354 if (infos[i].fs_type == PART_BOOT_TYPE &&
355 infos[i].mount != NULL && 355 infos[i].mount[0] != 0 &&
356 strcmp(infos[i].mount, PART_BOOT_MOUNT) == 0) { 356 strcmp(infos[i].mount, PART_BOOT_MOUNT) == 0) {
357 infos[i].size = PART_BOOT_LARGE; 357 infos[i].size = PART_BOOT_LARGE;
358 return; 358 return;
359 } 359 }
360 } 360 }
361} 361}
362 362